Preheat Oven and Prepare Tin:
Preheat your oven to 425°F (220°C). Line a muffin tin with cupcake liners and lightly grease them to prevent sticking.
Make the Chocolate Batter:
In a microwave-safe bowl or double boiler, melt the butter and chopped chocolate together, stirring until smooth. Set aside to cool slightly.
In a mixing bowl, whisk together the sugar, eggs, and vanilla extract until light and fluffy. Slowly add the melted chocolate mixture and mix until combined.
Fold in the flour and salt just until no streaks remain. Be careful not to overmix.
Prepare the Raspberry Filling:
In a small bowl, mash the raspberries with a fork. If desired, add 1 tablespoon of sugar to sweeten.
Assemble the Cupcakes:
Fill each muffin liner halfway with the chocolate batter. Add a small spoonful of raspberry filling in the center of each, then top with more chocolate batter until the liner is about 3/4 full.
Bake:
Bake the cupcakes for 10–12 minutes, or until the edges are set but the centers are still soft. The tops may crack slightly, which is normal.
Cool Slightly and Serve:
Allow the cupcakes to cool in the pan for 5 minutes before carefully removing them. Serve warm for the best gooey lava effect.
Garnish:
Dust with powdered sugar or cocoa powder, and top with a fresh raspberry for an elegant finish.