Pour the milk into a heavy-bottomed saucepan. Sprinkle in 1⁄4 cup of the sugar, letting it sink, undisturbed, to the bottom. Without stirring, bring the milk to a very gentle simmer over medium heat, 5 minutes.
In a medium bowl, whisk together the egg yolks, cornstarch, remaining 1⁄4 cup sugar, and the salt.
Whisk the hot milk mixture, then gradually whisk it into egg yolk mixture. Return the mixture to the saucepan and cook over medium heat, whisking constantly, until the pastry cream simmers and thickens, 2 to 3 minutes. Remove it from the heat, then whisk in the vanilla and butter until smooth.
For smoothest results, pour the pastry cream through a fine-mesh strainer into a bowl, using a rubber spatula to gently force it through. Cover the pastry cream with plastic wrap directly on its surface to prevent a skin from forming. Refrigerate for at least 4 hours.