Prep the pan and oven: Line a 12-cup muffin tin with paper liners. Preheat your oven to 350°F (175°C).
Starting with a hot oven helps the cupcakes rise evenly.
Whisk the dry ingredients: In a medium bowl, whisk together the flour, baking powder, and salt. This distributes the leavening so every cupcake rises the same.
Cream the butter and sugar: In a large bowl, beat the softened butter and sugar on medium speed for 2–3 minutes until pale and fluffy. Don’t skip this—creaming adds air and makes a lighter crumb.
Add the eggs and vanilla: Beat in the eggs one at a time, mixing well after each. Add the vanilla extract.
Scrape down the sides of the bowl so everything blends evenly.
Combine wet and dry: Add half the dry ingredients to the butter mixture and mix on low just until combined. Pour in the milk (and sour cream/yogurt if using), mix, then add the remaining dry ingredients. Stop mixing as soon as you no longer see streaks.
Portion the batter: Divide the batter evenly among the liners, filling each about two-thirds full. An ice cream scoop makes this quick and neat.
Bake: Bake for 16–20 minutes, or until the tops spring back lightly and a toothpick comes out with a few moist crumbs. Start checking at 16 minutes.
Cool completely: Let the cupcakes rest in the pan for 5 minutes, then transfer to a wire rack to cool fully.
Frosting will melt if the cakes are warm.
Make the frosting: Beat the butter until creamy, about 1–2 minutes. Add the powdered sugar, vanilla, salt, and 1 tablespoon milk. Beat on low to combine, then increase to medium-high for 1–2 minutes until fluffy.
Add more milk, a teaspoon at a time, to reach a smooth, spreadable texture.
Frost and finish: Spread or pipe the frosting onto cooled cupcakes. Add sprinkles if you like. Serve at room temperature for the best flavor.