Preheat the oven to 170C (160C fan). Place the cupcake liners into the baking tin and set aside. In a bowl of an electric mixer, beat the butter and sugar until combined, about 1 minute. Add vanilla and egg and mix until combined, about 2 minutes. Sift in the flour and cocoa powder into the mixture and mix until just combined on a low speed. Divide the batter between 4 cupcake cases and bake for 15- 18 minutes until risen, and the toothpick inserted in the middle comes out clean. Remove from the oven and allow to cool.
Meanwhile, prepare the buttercream. Place a heatproof bowl over a pan of gently simmering water, making sure that the bottom of the bowl doesn't come into contact with water. Add chopped chocolate and allow it to melt, stirring from time to time. Remove from the heat and set aside to cool slightly.
Using an electric mixer (or freestanding mixer with a paddle attachment), cream the butter until pale and fluffy, about 2-3 minutes. Add the vanilla, turn the speed to low and add the icing sugar. Once combined, increase the speed to medium high and beat until smooth and silky, about 3 minutes. Make sure to scrape the sides and the bottom of the bowl. Add melted chocolate and mix on low speed until fully combined. Transfer the buttercream into a piping bag fitted with your favourite nozzle.
If using dulce de leche for the filling, simply scoop out the small hole in the middle top of each cupcake and spoon in a little of dulce de leche. Pipe the buttercream onto each cake & enjoy!