Combine sugar, flour, and salt in a medium-sized saucepan and whisk well to combine and remove any lumps from the flour.
Turn stovetop heat to medium and whisk in milk until mixture is smooth.
Continue whisking constantly until mixture is thickened to a pudding-like consistency and the whisk leaves a trail.
Remove from heat and pour into a heat-proof container and cover the surface with a piece of plastic wrap, wax paper, or parchment paper pressed directly against the surface. Allow to cool completely to room temperature.
Once flour mixture has cooled, use an electric mixer or stand mixer to beat butter on high speed until it is light and fluffy.
Reduce mixer speed to medium and gradually add flour mixture, one heaping spoonful at a time, waiting until each spoonful is incorporated before adding the next.
Scrape sides and bottom of bowl with a spatula, then stir in vanilla extract.
Gradually increase speed to medium-high and whip frosting until it is smooth, light, and airy.
Use your spatula to deflate the frosting to work out any air bubbles, then use as desired.
