Put the vanilla (whole bean or extract) in the cream and heat. Once it boils, take the pot off the stove and remove the vanilla bean (if applicable).
Whisk together the egg yolks, sugar, and cornstarch in a separate bowl.
Gradually whisk the cream into the egg mix to get a smooth mixture.
Pour the mixture back into the pot and heat while stirring regularly. Important: Do not bring to a boil, as this will cause the mixture to separate.
The cream thickens as it heats up, so you want to aim for somewhere right under the boiling point.
Once the consistency of the custard cream is thick enough, remove it from the heat and pour it into a separate bowl and let cool down. If you are refrigerating overnight, cover the bowl with plastic wrap to prevent milk skin from forming.