What you need is Crème pâtissière. Plenty of easy recipes online.
I cheat and use bought sheets of butter flaky pastry (I am a good cook but I am death to pastry :-( )
Cut into strips the length and width of your custard slices.
Or you can make it bigger and cut them later but this can be tricky.
Prick the pastry all over and sprinkle with sugar, bake. These will last a couple of day in the fridge if you are not assembling them at once.
Make your Crème pâtissière and allow it to go cold.
Pipe, or just spread it onto a pastry strip, top with another, ice the top.
Variations include jam or fruit one the bottom strip before the Crème pâtissière and chocolate rather than icing on top.
These are a great favourite with my dil and she has requested I make Mille Feuille for Christmas Day dessert.
I think I shall make it with Black Cherries and Kirsch....on the other hand, there's be fresh raspberries available....mmmm, decisions, decisions.
.