Preheat oven to 350F/180C. Line muffin tin with liner papers. Set aside.
In a medium bowl, sift together flour, cocoa powder, baking soda, salt. Set aside.
In a standing mixer fitted with the paddle attachment, beat together butter and sugar on medium speed until light and fluffy, 3-5 minutes. Scrape down the sides and bottom of the bowl as necessary. Add egg and mix to combine. Add vanilla, food coloring, and vinegar, and beat until combined. On low speed, beat in flour mixture in 3 additions, alternating with the buttermilk in 2 additions, starting and ending with the flour. Do not over mix.
Divide batter evenly between liners, filling them about 2/3 full. Bake for 15-20 minutes, until a toothpick inserted into the center comes out clean. Allow cupcakes to cool for 10 minutes, then remove from pan and allow to cool completely on a wire rack.
To make the frosting: In the bowl of an electric mixer fitted with the paddle attachment, beat butter and cream cheese on medium-high speed until smooth and creamy, 2-3 minutes. Add sugar in 2 additions, beating well after each addition until smooth. Add vanilla and keep beating until smooth and fluffy. You can add more sugar as necessary until desired consistency (thick enough to pipe). You can also add a pinch of salt to cut sweetness. Pipe frosting onto cupcakes.
Frosted cupcakes can be kept for up to 3 days at room temperature or in the refrigerator in an airtight container. Unfrosted cupcakes can be kept in the freezer for up to 2 months, then thawed overnight in the fridge. Frosting can be kept in an airtight container in the fridge for up to 3 days. It doesn’t freeze well. Before using, bring to room temperature and whisk by hand for a few seconds until smooth.