In a saucepan, heat up the milk and vanilla seeds, powder, or paste. If using vanilla extract, add it at the end when adding the butter.
Meanwhile, combine egg yolks, sugar, cornstarch, and salt. Mix it all together.
As soon as the milk comes to a boil, remove it from the stove and add just a bit to the egg mixture while whisking at the same time. Keep the bowl sturdy on a towel or surface where it won't move while you are pouring and whisking at the same time.
Once the eggs are tempered (read the notes above for more info), add the rest of the milk. Transfer back to the stovetop and whisk constantly on medium heat for about 2–5 minutes. It will thicken pretty fast, so don't leave it and walk away!
When the mixture has thickened, take it off the stove and add the butter. Mix till melted. Add the vanilla extract if using.
Cover with plastic by placing it right at the surface of the cream. This way the cream won't develop skin when cooling. As it cools, it will become thicker.
Transfer to the fridge to chill. Use as needed.