Heat 2 cups milk in a saucepan until steaming, not boiling
In a bowl, whisk 3 egg yolks, 1/4 cup sugar, and 2 tablespoons cornstarch until smooth
Slowly pour a little hot milk into the egg mixture while whisking constantly
Pour the tempered mixture back into the saucepan
Cook over medium-low heat, whisking constantly, until thickened
Remove from heat and stir in 1 teaspoon vanilla extract and a pinch of salt
Strain the custard through a fine sieve if desired
Cool slightly before serving or chilling
