unsalted butter, cut into 1/2-inch pieces
Put the sugar, cornstarch, and salt in a medium saucepan and whisk to combine.
Whisk in the milk, a few tablespoons at a time, making sure to dissolve all the cornstarch, and taking care to smooth out any lumps. Whisk in the egg yolks.
Whisking constantly, cook over medium-high heat until the mixture thickens and bubbles start to form and sputter; about 6 minutes.
Reduce heat to low and continue to cook, whisking constantly, for 1 minute. Remove from heat and whisk in the butter and vanilla. Divide the pudding, through a strainer, evenly between 4 serving bowls.
Press plastic wrap to the surface of the pudding and chill for at least 1 hour.