Whisk the sugar, cornstarch, and salt together in a medium saucepan.
Gradually whisk in the milk until smooth with no dry pockets of starch.
Set over medium heat and cook, whisking constantly, until steaming and thick enough to coat the back of a spoon, 6β8 minutes. When it starts to bubble, reduce the heat to medium-low.
In a separate bowl, whisk the egg yolks. Slowly ladle in about 0.5 cup of the hot mixture while whisking constantly to temper.
Return the tempered yolk mixture to the saucepan, whisking as you pour. Cook over medium-low, stirring constantly, until a few slow bubbles break the surface and the pudding leaves thick ribbons on the whisk, 1β2 minutes more. Do not boil hard.
Remove from the heat; whisk in the butter until melted, then stir in the vanilla. Strain through a fine-mesh sieve into a clean bowl.
Divide into serving cups or keep in the bowl. Press plastic wrap directly onto the surface to prevent a skin. Let stand 15 minutes to cool slightly, then refrigerate until set, 2β3 hours.
Serve chilled; stir before serving if the surface has firmed.