In a standing mixer bowl, whisk together the egg yolks and sugar until smooth and the mixture forms ‘ribbons’ as the whisk rotates. Then add the flour or cornstarch slowly, bit by bit, into the mixture until fully incorporated. The mixture should be a pale yellow and quite fluffy.
Meanwhile, heat the milk (or milk and cream) over moderate heat until hot but not boiling. You will see little bubbles just beginning to form around the edge of the pot. (If you are using a vanilla bean, add it to the milk and let it steep for a few minutes, then remove it.) Take the milk off the heat and drizzle it, little by little, into the mixer bowl. Now pour the whole thing from the bowl into the pot (along with the vanilla extract if using) and put it over very gentle heat, whisking continuously and vigorously. After a while, it should begin to thicken. Keep stirring until you have a thick custard.
Remove from the heat, stir in the grated lemon zest if using, and let the mixture cool. It will thicken further as it cools.
When the custard has cooled completely, whip the cream with the powdered sugar until it forms stiff peaks. Fold it into the custard until you have a uniformly fluffy consistency.