First, make the cupcakes. Position a rack in the center of the oven and preheat to 375°F. Line a muffin tin with paper liners
Mix the dry ingredients and butter. In the bowl of a stand mixer fitted with the paddle attachment, combine the flour, sugar, baking powder, salt, and butter. Beat on medium-low until the mixture, has the texture of coarse meal, with pea-sized pieces of butter throughout, about 3 minutes.
Add half the milk. Add half the milk all at once and increase the mixer to medium. Beat until the batter is light and fluffy, about 2 minutes, using a rubber spatula to scrape down the bottom and sides of the bowl as necessary.
Mix the egg, vanilla, and remaining milk. While the batter is mixing, whisk together the egg, vanilla, and remaining milk in a liquid measuring cup. Reduce the mixer to low and add this mixture in two or three additions, scraping down the bottom and sides of the bowl after each addition, then beat until just combined.
Fill the pan. Use a cookie dough scoop to fill each paper liner two-thirds of the way full with batter.
Bake the cupcakes. Bake for 20 to 25 minutes, or until the top of a cupcake bounces back when gently pressed. A skewer inserted into the center of the cake should come out with a few crumbs attached. Cool the cupcakes completely in the pan on a wire rack before frosting.
Next, make the frosting. Once the cupcakes are cool, make the frosting. In the bowl of a stand mixer fitted with the paddle attachment, beat the confectioners' sugar and butter together on medium-low until smooth and creamy, about 1 minute. Scrape down the bottom and sides of the bowl with a rubber spatula. Add the milk and vanilla all at once and beat on low just to incorporate the liquid. Scrape down the bottom and sides of the bowl once more, then beat on medium-high until the frosting is creamy and smooth, 5 minutes.
Assemble the cupcakes. Use a 1-Tablespoon cookie dough scoop to spoon 1 Tablespoon of frosting per cupcake. Use an offset spatula to spread the frosting across the top of the cupcakes. Garnish immediately with sprinkles.
Serve and store. Serve at room temperature. The cupcakes will keep, in an airtight container or underneath a cake dome, at room temperature 1 day. After that, transfer to the refrigerator and refrigerate for up to 2 more days.