Preheat the oven to 350°F (175°C). Grease the muffin tin or line it with cupcake liners.
In a mixing bowl, beat together softened butter and sugar until light and fluffy. Add eggs one at a time, mixing well after each addition. Then, mix in the vanilla extract.
In another bowl, combine flour, baking powder, and salt. Gradually add this dry mixture to the butter mixture, alternating with milk. Mix until just combined.
Pour the batter evenly into each cup of the muffin tin, filling each about 2/3 full. Bake in the preheated oven for 18-20 minutes, or until a toothpick inserted into the center comes out clean. Let cool on a wire rack.
While the cupcakes are baking, prepare the pastry cream. In a saucepan, heat the milk and half the sugar over medium heat until just steaming.
In a separate bowl, whisk the egg yolks, cornstarch, and remaining sugar until smooth. Gradually whisk in the hot milk mixture.
Pour the mixture back into the saucepan and cook over medium heat, stirring continuously, until it thickens (about 5-7 minutes). Remove from heat, stir in the vanilla extract and butter, then let cool.
For the ganache, place chocolate chips in a bowl. Heat heavy cream in a saucepan until just boiling, then pour over the chocolate. Let it sit for a minute, then stir until smooth.
Once the cupcakes are cool, use a knife to cut a small hole in the center of each. Fill a piping bag with pastry cream and pipe into each cupcake until filled.
Dip the tops of each filled cupcake into the chocolate ganache or use a spoon to drizzle it on top. Allow the ganache to set before serving.