Preheat the oven to 350°F (175°C) and line a 12-cup muffin tin with paper cupcake liners.
In a medium bowl whisk together the flour, baking powder, baking soda, and salt, then set aside.
In a large mixing bowl beat the softened butter and granulated sugar with an electric mixer on medium speed until light and fluffy, about 2–3 minutes.
Add the eggs one at a time, beating well after each addition, then mix in the vanilla extract until combined.
In a small bowl stir together the buttermilk and sour cream until smooth.
Add one-third of the dry ingredients to the butter mixture and mix on low just until combined.
Add half of the buttermilk mixture and mix on low until incorporated.
Repeat with another third of the dry ingredients, then the remaining buttermilk mixture, and finish with the last third of the dry ingredients, mixing just until a smooth batter forms.
Divide the batter evenly among the 12 cupcake liners, filling each about two-thirds full.
Bake the cupcakes for 16–18 minutes, or until a toothpick inserted in the center comes out clean or with a few moist crumbs.
Transfer the pan to a wire rack and let the cupcakes cool in the pan for 5 minutes.
Remove the cupcakes from the pan and let them cool completely on the wire rack, about 25 minutes.
While the cupcakes cool, prepare the frosting by beating the softened butter in a large bowl on medium speed until creamy, about 1–2 minutes.
Gradually add the powdered sugar, 1 cup at a time, mixing on low speed until combined and scraping down the sides as needed.
Add the vanilla extract, salt, and 2 tablespoons of heavy cream or milk, then beat on medium-high speed for 2–3 minutes until light and fluffy, adding a bit more cream if needed to reach a pipeable consistency.
If using a “hidden baby,” gently press one clean plastic baby charm or pecan into the bottom of each cooled cupcake, pushing it in from the top and covering the hole with a bit of cake.
Transfer the frosting to piping bags fitted with your desired tips, or use a spatula to spread frosting generously on top of each cooled cupcake.
If you want colored frosting instead of colored sugar, divide the frosting evenly into three bowls and tint each bowl with green, purple, or yellow food coloring, then pipe each color onto different cupcakes or swirl them together.
If using sanding sugar, keep the frosting white and immediately sprinkle green, purple, and gold sanding sugar over the freshly frosted cupcakes in stripes or sections to resemble a king cake.
Chill the decorated cupcakes for 10–15 minutes if you want the frosting to set slightly before serving, or serve immediately at room temperature.