In a medium saucepan, combine granulated sugar, cornstarch, and salt.
Gradually whisk in the whole milk until smooth.
Cook over medium heat, stirring constantly, until the mixture thickens and comes to a gentle boil.
In a separate bowl, lightly beat the egg yolks.
Temper the egg yolks by slowly pouring in about 1/2 cup of the hot milk mixture, whisking constantly to prevent the eggs from curdling.
Gradually whisk the tempered egg yolks back into the saucepan with the remaining milk mixture.
Bring to a gentle boil and cook for an additional minute, stirring continuously.
Remove from heat and stir in the unsalted butter and pure vanilla extract until well combined.
Pour the pudding into a bowl or individual serving dishes.
To prevent a skin from forming on top, place a piece of plastic wrap directly on the surface of the pudding.
Refrigerate until fully chilled and set, about 2-3 hours.