1. In a saucepan, heat the milk over medium heat with the vanilla until hot but not boiling. If using vanilla extract, add it after removing the milk from the heat.
2. In a separate bowl, whisk together the egg yolks, sugar, and cornstarch until smooth.
3. Slowly pour the hot milk over the yolk mixture, whisking constantly to prevent the yolks from cooking.
4. Return the mixture to the saucepan and cook over medium-low heat, stirring constantly, until the mixture thickens and has the consistency of cream. This will take a few minutes. Remove from the heat and set aside.
Make the cones:
1. Preheat the oven according to the instructions on the puff pastry package.
2. Cut the puff pastry sheets into triangles. Roll each triangle from the base to the tip, forming cones. You can use molds or just roll them by hand.
3. Arrange the cones on a baking sheet and brush them with beaten egg so that they are golden and shiny when cooked.
Bake:
1. Bake the puff pastry cones in the preheated oven according to the instructions on the package, or until they are golden and crispy.
Fill the cones:
1. Once the cones are completely cooled, you can fill them with pastry cream. You can use a teaspoon or a piping bag to make it easier.
Ready! You will now have delicious custard-filled cones to enjoy. You can sprinkle a little icing sugar on top before serving if you like. Bon Appetit!