This is my classic custard recipe. Make it in advance so it has time to cool for at least 2 hours.
In a bowl whisk together the egg yolks, sugar ,and cornstarch until pale and thick.
Put the milk and vanilla in a saucepan over medium heat and warm it until it is scalding hot - this means there is steam rising and you can see tiny bubbles appearing on the surface.
Drizzle a small amount of warm milk into the egg yolk mixture and whisk, then add a little more, repeat until everything is together in the bowl. It's important to do this slowly and gradually so you don't scramble the eggs
Pour the whole mixture back into the saucepan and keep heating, whisking constantly until it begins to boil. Boil for 1-2 minutes until it thickens. Remove from the heat
Pass the pastry cream through a fine-mesh sieve into a bowl to make sure there are no lumps. Cover with plastic wrap and set aside to cool.
Make the Custard Buttercream
Once the pastry cream has completely cooled, place all the butter in your stand mixer and beat with a whisk attachment on medium-high speed for 5 full minutes until pale and fluffy .
Add the pastry cream one tablespoon at a time until it is all added. Whip for 1 minute on high speed.
At this stage, taste-test the buttercream to see how much sweetness you would like to add. Add the icing sugar a little at a time, whipping after every addition, until the desired sweetness is reached.