Add the flour, sugar, cocoa powder, and salt directly into a 12-16 ounce microwave-safe mug. Whisk with a fork until no lumps remain and the dry ingredients are evenly combined.
Crack the egg into the mug and stir vigorously with the fork, breaking up the yolk and mixing until the batter is smooth with no streaks of egg visible.
Pour in the milk, oil, and vanilla extract. Stir gently just until the wet ingredients are fully incorporated and the batter looks glossy, about 15-20 strokes total.
Tap the mug firmly on the counter 2-3 times to release any air bubbles trapped in the thick batter.
Microwave on high power for 50-70 seconds, depending on your microwave wattage. The cake is done when the top looks mostly set with just a slight glossy sheen in the very center.
Let the mug sit for 1 minute before eating — the residual heat finishes cooking the center and the cake firms up slightly for easier scooping.