Preheat oven to 350°F (175°C) and line a muffin tin with cupcake liners.
In a bowl, whisk together flour, baking powder, baking soda, and salt.
In another bowl, beat butter and sugar until light and fluffy. Add eggs one at a time, then mix in vanilla.
Alternate adding dry ingredients and milk/sour cream to the butter mixture, mixing until just combined.
Divide batter into liners and bake for 16-18 minutes. Cool completely.
For custard: Heat milk in a saucepan. In a bowl, whisk egg yolks, sugar, and cornstarch. Gradually add warm milk to egg mixture, return to heat, and stir until thickened. Remove from heat, add butter and vanilla. Chill.
Core each cupcake, fill with custard, and replace the top piece.
For ganache: Heat cream, pour over chocolate, let sit, then stir until smooth. Dip cupcake tops and let set.