Fair warning: Once you have tried making this Yellow Cake with Chocolate Frosting, you will never be able to go back to a boxed cake mix or canned frosting again. This is the best yellow cake with chocolate buttercream I've ever had and I'm preeeeeetty sure you will agree.
Preheat oven to 350 degrees F. Grease and flour two 8-inch round cake pans or line bottoms of each pan with parchment paper circles.
In a medium bowl, whisk together the flour, baking powder and salt. Set aside.
In bowl of a stand mixer, cream the butter and sugar together until light and fluffy, about 2-3 minutes, scraping down the sides of the bowl a couple of times during mixing.
Add the eggs to the butter and sugar, one at a time, beating well after each addition, then mix in the vanilla.
Add the flour mixture and the milk alternately, about 1/3 of each at a time, mixing between additions just until combined.
Divide the batter evenly between the two prepared round pans, then bake for 30-35 minutes, until a toothpick inserted into the center of each cake comes out clean. If using larger 9-inch pans, the cakes will be a little thinner and bake in slight less time (around 23-27 minutes), and if making cupcakes, they will bake for 18-21 minutes.
Remove the cakes from the oven and cool for 10 minutes before running a sharp knife around the edges, then gently turning the cakes out onto a wire cooling rack to cool completely.
Trim the tops of the completely cooled cakes so they are level, then frost with chocolate buttercream and decorate with sprinkles.
In a large bowl, beat the butter and cocoa powder together until creamy and smooth.
Gradually add the powdered sugar 1 cup at a time, with 1 tablespoon of the milk or cream at a time, mixing between each addition and scraping down the sides of the bowl as needed.
Add the vanilla and salt and mix well, adjusting the consistency by adding powdered sugar or milk as needed. Use to frost a 2-layer cake.