Prep your tools. Line a 12-cup muffin pan with paper liners.
Preheat the oven to 350°F (175°C). Have a small paring knife or cupcake corer ready for filling later.
Make the batter. In a bowl, whisk flour, baking powder, baking soda, and salt. In another bowl, whisk sugar, eggs, oil, milk, sour cream, and vanilla until smooth.
Add dry ingredients to wet and whisk just until combined. Do not overmix.
Fill and bake. Divide the batter evenly among liners, about two-thirds full. Bake 18–20 minutes, until the tops spring back and a toothpick comes out clean. Cool in the pan 5 minutes, then move to a wire rack to cool completely.
Prepare your filling. Ganache: Heat cream until steaming, pour over chopped chocolate, rest 2 minutes, then stir until smooth.
Let it thicken to a spoonable consistency.
Pastry cream, lemon curd, jam, or caramel: Chill or cool until thick, not runny. The filling should hold a soft mound on a spoon.
Core the cupcakes. Once fully cool, use a cupcake corer or a small knife to cut a 3/4-inch circle from the center of each cupcake about 2/3 of the way down. Remove the plug and trim off the bottom to create a thin “cap.” Don’t cut through the bottom.
Fill neatly. Spoon or pipe 1–2 teaspoons of filling into each cavity. Stop just below the top so it doesn’t bulge out. Place the thin cake “cap” back on to seal.
Make the frosting. Beat butter until creamy.
Add powdered sugar gradually, then vanilla, salt, and cream until fluffy and spreadable. Adjust with more cream or sugar to get a smooth, stable swirl.
Frost and decorate. Pipe a swirl or spread with an offset spatula. The frosting locks in the cap and keeps the filling from peeking out.
Add sprinkles, zest, or chocolate shavings if you like.
Set and serve. For the cleanest cuts and neatest bites, chill the cupcakes 15–20 minutes to set the filling and frosting slightly, then serve at room temperature.