In a medium saucepan, heat the milk and vanilla on medium heat until it is just at a simmer. Don't let it boil.
While the milk is warming, add the egg yolks, sugar, salt, and cornstarch to a separate bowl. Whisk them together until glossy and smooth. Place the bowl on a dampened kitchen towel to stop it from slipping. 100 g granulated sugar 4 large egg yolks, 100 g granulated sugar, 30 g cornstarch, 1/4 teaspoon salt
Once the milk is hot, pour it in a steady stream into the egg mixture while whisking vigorously.
Return the combined mixture to the saucepan over medium heat. Cook the custard, whisking constantly, until it starts boiling. Once it starts bubbling, keep it at a boil and whisk for a full minute.
Take it off the heat and whisk in the butter until completely combined. 45 g unsalted butter
Pour the pastry cream into a clean bowl (push it through a fine-mesh sieve first for extra smoothness). Lay plastic wrap directly onto the surface of the custard and let it cool to room temperature. The custard must be at room temperature before continuing, or the butter in the next step will melt. You can refrigerate the custard, but bring it back to room temperature before using.