In a large microwave-safe mug, whisk together 3 tablespoons granulated sugar, 30 g all-purpose flour, ¼ teaspoon kosher salt, ¼ teaspoon baking powder, and 2 tablespoons unsweetened cocoa powder until evenly combined.
Add 3 tablespoons whole milk, 3 tablespoons vegetable oil, 1 large egg, and ½ teaspoon vanilla extract. Whisk until completely smooth, with no dry pockets remaining at the bottom.
Press 4 squares of dark chocolate into the center of the batter. Keep them together and push them just below the surface.
Microwave on high for 75–90 seconds, checking at 75 seconds. The cake surrounding the chocolate should be set with no wet batter; the chocolate in the middle should remain melted. If the surrounding cake is still wet, continue microwaving briefly and check again rather than relying on the timer alone.
Let the mug cake rest for 30–45 seconds, then serve it warm from the mug.
Notes
Leave room to rise: Use a large mug with space above the batter so the cake can rise without spilling over the rim. Check the cake around the filling: Melted chocolate will leave a wet mark on a spoon or skewer. Judge whether the cake is cooked by the surrounding crumb, rather than expecting the chocolate center to come out clean. Start with room-temperature ingredients: The preparation time assumes the milk and egg are already at room temperature.