Put the sugar, cocoa powder, butter, and milk into a large nonstick pot and heat over medium until everything is melted (3-4 minutes), and stir until well-combined.
Let everything heat up, and once the mixture gets to a medium-low boil (tiny bubbles ~2mm big throughout the liquid), set a timer for two minutes and let it boil without stirring it. I repeat: do not stir it. If the bubbles change size or frequency, your heat is too high and should be lowered to keep the bubbles steady. To test the fudge sauce halfway through your timer, dip a spoon in and very quickly take ¼ teaspoon or so of the sauce out and drop it into a glass of room temp water. If the sauce remains liquid in the water rather than holding loosely together, then the butter and sugar aren't cooked enough; at two minutes it will be done or at least done enough
When the timer goes off, turn off the heat, move the pot to a cool burner, and immediately stir in the vanilla; don't mix it for more than 15-20 seconds. Your homemade fudge sauce is now done and can be immediately poured over ice cream, cake, or brownies, and leftovers can be stored in the fridge (but it will harden quite a bit; just heat it for 20 seconds in the microwave).