Preheat your oven to 350°F and line a muffin tin with cupcake liners. While the oven heats, measure out all your ingredients and bring the butter, egg, and milk to room temperature—this helps them emulsify properly with the sugar and creates a lighter crumb. Chop the semi-sweet chocolate into small, uniform pieces so it melts evenly when the hot cream is added.
In a medium bowl, whisk together the flour, Dutch process cocoa powder, baking powder, baking soda, salt, and espresso powder. The espresso powder won't add coffee flavor—instead, it deepens the chocolate notes and adds complexity. Whisking the dry ingredients together ensures even distribution of the leavening agents, which guarantees consistent rise across all your cupcakes.
In a large bowl, beat the room-temperature butter and granulated sugar together for 1-2 minutes until the mixture is pale and fluffy. This creaming process incorporates air into the batter, which creates a tender, light crumb. Stop and scrape down the bowl halfway through to ensure even mixing.
Add the egg, egg yolk, and vanilla extract to the creamed butter and sugar, beating for 1-2 minutes until well combined. The extra yolk adds richness and creates a more tender texture. Pour in the milk and sour cream and stir until just combined—the sour cream adds tang that balances the sweetness and deepens the chocolate flavor. I like to alternate adding the milk and sour cream rather than adding them all at once, as this helps prevent curdling.
Add the dry ingredient mixture from Step 2 to the wet batter from Step 4, stirring until just combined—don't overmix, as this can develop gluten and make the cupcakes tough. Divide the batter evenly among the lined cups, filling each about three-quarters full. Bake for 17-20 minutes, until a toothpick inserted in the center comes out with just a few moist crumbs. Remove from the oven and let cool in the pan for 5 minutes, then turn out onto a wire rack to cool completely before filling and frosting.
Heat the heavy cream until it's steaming (about 170°F or just before boiling), then pour it over the chopped chocolate from Step 1. Let it sit undisturbed for 2 minutes to allow the residual heat to soften the chocolate, then stir until smooth and glossy. Once the ganache cools slightly, stir in the raspberry preserves until fully incorporated. Let the ganache cool to room temperature for about 15 minutes until it reaches a spreadable consistency—it should be thick but still pourable.
While the ganache cools, beat the room-temperature butter with a pinch of salt for about 5 minutes until pale and fluffy. Gradually add the sifted powdered sugar, beating until light and fluffy. Crush the freeze-dried raspberries into a fine powder, then fold them into the frosting along with the remaining raspberry preserves and vanilla extract. Mix until fully combined and spreadable—I find that freeze-dried raspberries give a more intense, pure raspberry flavor compared to fresh berries, which can sometimes dilute the frosting with excess moisture.
Using a small knife or cupcake corer, carefully remove the center of each cooled cupcake from Step 5, creating a small cavity for the filling. Fill each cavity with the chocolate-raspberry ganache from Step 6. Top each cupcake generously with the raspberry frosting from Step 7, swirling it decoratively with the back of a spoon or an offset spatula. Garnish with fresh raspberries if desired, pressing them gently into the frosting for visual appeal.