Preheat oven: Start by preheating your oven to 350°F (175°C). Line a muffin pan with cupcake liners to keep things neat as your cupcakes rise.
Whisk dry ingredients: In a medium bowl, combine all-purpose flour, cocoa powder, baking soda, and salt. Whisk until well blended for an even distribution of flavors.
Mix wet ingredients: In a small bowl, mix buttermilk, white vinegar, and vanilla extract together. This tangy mixture adds moisture and reacts with the baking soda for a fluffy finish.
Cream butter and sugar: In a large bowl, cream together softened butter and granulated sugar until the mixture is light and fluffy, about 2-3 minutes. This step is key for fluffy cupcakes!
Incorporate eggs: Beat in the eggs one at a time, ensuring each is fully incorporated before adding the next for a smooth batter.
Combine mixtures: Gradually alternate adding the dry ingredient mix and buttermilk mixture to the butter mixture, starting and ending with the dry ingredients. Stir until just combined to avoid overmixing.
Add coloring: Gently fold in the red gel food coloring, adjusting the amount to achieve your desired hue. This adds the beautiful red color characteristic of red velvet cupcakes.
Prepare cream cheese swirl: In another bowl, beat together the cream cheese, softened butter, powdered sugar, and vanilla extract. Mix until creamy and smooth, creating a delightful swirl component.
Make raspberry swirl: In a small bowl, stir together the seedless raspberry preserves and the optional red gel food coloring for a vivid raspberry swirl.
Fill and swirl: Spoon the red velvet batter into the lined muffin cups, then add dollops of the cream cheese mixture and raspberry preserves on top.
Create swirls: Use a toothpick or skewer to gently swirl the mixtures together, creating a marbled effect that looks stunning.
Bake: Place the pan in the preheated oven and bake for 18-20 minutes. They’re ready when a toothpick inserted comes out with a few moist crumbs.
Cool: Allow the cupcakes to cool in the pan for 5 minutes before transferring them to a wire rack to cool completely, letting their flavors settle.