Stir the yeast into the water to dissolve. For the yeast to work properly, the water should be between 110-115 degrees.
Place the yeast mixture into the bowl of a stand mixer fitted with the dough hook. Add the ground cardamom if using, eggs, lukewarm milk, sugar, and salt. Mix on low speed until fairly well combined, it doesn't have to be perfect.
With the mixture on low speed, gradually add the flour until the flour is all added and dough is well mixed. It will be pretty sticky and may cling to the sides of the bowl quite a bit.
With the mixture on low speed, add the softened butter one pat at a time until all the butter is fully incorporated. Cover the bowl with a tea towel or plastic wrap and let the dough rest for 10-15 minutes.
Turn the mixer to low speed and allow the dough hook to knead the dough for 10-12 minutes, or if you prefer to knead by hand, turn the dough out onto a lightly floured surface, flour your hands, and knead thoroughly 5-7 minutes.
Cover the bowl and place it in a warm spot to rise for about 1.5 hours (slightly shorter if your kitchen is very warm, longer if your kitchen is very cold).
While the dough is rising, make the homemade vanilla custard: Place the egg yolks, sugar and cornstarch in a mixing bowl and whisk briskly until the sugar has dissolved and the whole mixture has thickened & lightened.
Meanwhile, add the milk, cream and vanilla beans (or paste) to a saucepan, and bring the mixture to a simmer over medium heat. Don't boil- remove the pan from the heat and pour about 1/3 of the hot milk mixture into the yolk mixture in a steady stream, preferably while whisking. Continue to whisk until the mixture is well combined and smooth, then pour the egg & milk mixture into the bowl back into the remaining milk mixture in the pot. Stir well until fully combined.
Place the pot back onto the heat, continuously stirring until the mixture has thickened, then continue to cook & stir constantly over medium-low heat for 5 more minutes.
Remove the pot from the heat and continue to stir for about 2 more minutes, then transfer the custard to a large heatproof bowl. It should be very thick. Remove the vanilla beans and leave the custard to cool to room temperature, then put it in the fridge.
When you remove the custard from the fridge to use it, you may want to whisk it a few times to loosen & smooth it.
Line a couple of baking sheets with parchment paper.
When the dough has risen, flour a work surface and turn the dough out onto it. Use a bench knife to divide the dough into 18 equal pieces- if you want to weigh them, they should each be approximately 55-60 grams.
Shape each piece into a ball and transfer them to the prepared baking sheets. Lightly cover the buns with plastic wrap and place them in a warm spot to rise for about 30 minutes, until they are puffy.
Toward the end of the rising time, preheat the oven to 425 degrees.
When the buns are puffy, lightly flour the tips of your fingers and press and dent into the middle of each one.
Fill a piping bag with custard and pipe a generous dollop of custard into the dent in the middle of each bun.
In a small bowl, whisk together an egg and a tablespoon of milk or cream and brush the egg wash onto the dough around the custard.
Bake buns for 12-15 minutes, until golden brown. Let cool on the pans for a few minutes before transferring to a wire rack to cool completely.
When the buns are completely cooled, whisk together the powdered sugar and water with a fork until a smooth glaze forms. Use a pastry brush to glaze the buns, around the custard. Sprinkle on the coconut flakes and serve!