You want to make the pastry cream the same day you make the donut dough so it has time to set up in the fridge.
In a bowl, whisk together the cornstarch and sugar, then add the eggs and whisk until smooth. Set aside.
Set aside another bowl with a fine mesh strainer - you will need this immediately after your pastry cream comes off the heat.
Pour milk into a medium saucepan. Split the vanilla bean and add half to the milk. If you're using vanilla bean paste or vanilla extract, DO NOT add it at this point (you will add it when you add the butter at the end). Add the salt and place the saucepan over medium-high heat and bring it to just under a boil and stir it every once in a while so you don’t burn the milk solids on the bottom of the pan.
Once the milk is simmering, add ⅓ of the milk to the egg/sugar/starch mixture and whisk constantly. Pour the egg mixture into the saucepan with the rest of the milk and return to medium high heat. Whisky vigorously and constantly, the mixture will begin to thicken and you will see the small milk bubbles start to disappear. Once this has happened, the mixture will quickly thicken and boil. As soon as it gets to a boil, immediately remove it from the heat and pass it through the sieve (with a wooden spoon or rubber spatula) into the bowl.
Allow the pastry cream to cool to 140 degrees F, then whisk in one tablespoon of butter at a time. Don’t add a new piece until the other has been fully incorporated. Once all butter has been added, add the vanilla bean paste/extract and mix to combine. Cover the bowl with plastic wrap and press the wrap directly on the cream so it doesn’t form a skin. Put the cream in the fridge to chill and rest with your dough overnight.