First, gather everything you need and let refrigerated items like eggs and butter come to room temperature. I always sift the flour and cocoa powder together for a smoother batter.
In one bowl, whisk together flour, cocoa powder, baking soda, and salt. This ensures the leavening agents are evenly distributed. I find this step helps cupcakes rise perfectly without uneven spots.
In another bowl, beat together oil, sugar, eggs, buttermilk, food coloring, vanilla, and vinegar. I like to mix until smooth but not overbeat, or cupcakes can get dense.
Gently fold the dry ingredients into the wet mixture until just combined. Overmixing can make the cupcakes tough, so I fold lightly with a spatula until no streaks remain.
Line your cupcake pan and fill each liner about two-thirds full. Bake at 350°F (175°C) for 18–20 minutes, or until a toothpick comes out clean. I love the anticipation as the kitchen fills with that warm, chocolatey aroma.
Let the cupcakes cool in the pan for 5 minutes, then transfer to a cooling rack. Frosting warm cupcakes can make it melt, so patience here pays off.
Beat softened cream cheese and butter together until smooth. Gradually add powdered sugar and vanilla, beating until fluffy. I always taste and adjust sweetness—it makes a big difference.
Use a piping bag or a spatula to frost cooled cupcakes. I like to swirl frosting elegantly for a bakery-style look. Decorate with sprinkles or crumbs if you’re feeling festive.