Preheat the oven to 170°C. Line a 12-hole muffin tin with cupcake cases.
Put the butter and the sugar in a freestanding electric mixer with a paddle attachment (or use a handheld electric whisk) and beat on medium speed until light and fluffy and well mixed. Turn the mixer up to high speed, slowly add the egg and beat until everything is well incorporated.
In a separate bowl, mix together the cocoa powder, red food colouring and vanilla extract to make a very thick, dark paste. Add to the butter mixture and mix thoroughly until evenly combined and coloured (scrape any unmixed ingredients from the side of the bowl with a rubber spatula). Turn the mixer down to slow speed and slowly pour in half the buttermilk.
Beat until well mixed, then add half the flour and beat until everything is well incorporated. Repeat this process until all the buttermilk and flour have been added. Scrape down the side of the bowl again. Turn the mixer up to high speed and beat until you have a smooth, even mixture. Turn the mixer down to low speed and add the bicarbonate of soda and vinegar. Beat until well mixed, then turn up the speed again and beat for a couple more minutes.
Meanwhile, make the frosting by beating the icing sugar the remaining 20g of the unsalted butter together in a freestanding electric mixer with a paddle attachment (or use a handheld electric whisk) on medium-slow speed until the mixture comes together and is well mixed. Add the cream cheese in one go and beat it until it is completely incorporated. Turn the mixer up to medium-high speed. Continue beating until the frosting is light and fluffy, at least five minutes. Do not overbeat, as it can quickly become runny.
Spoon the mixture into the paper cases until two-thirds full and bake in the preheated oven for 20 to 25 minutes, or until the sponge bounces back when touched. A skewer inserted in the centre should come out clean. Leave the cupcakes to cool slightly in the tray before turning out onto a wire cooling rack to cool completely. When the cupcakes are cold, pipe the cream cheese frosting on top.