Whisk together sugar, cornstarch, and salt in a medium sauce pan. Gradually whisk in the milk. Add the egg yolks and whisk until no yellow streaks remain.
Stirring constantly with a wooden spoon or silicone spatula, warm the mixture over medium heat until it just begins to simmer. Remove the pan from heat and scrape the sides and corners with a spatula before whisking vigorously until smooth.
Return the pan to the burner and whisk constantly until the mixture thickens, about 45 seconds to one minute.
Remove the pan from heat and whisk in the butter and vanilla extract.