Combine the milk, cornstarch, salt, and sugar in a saucepan over medium–low heat and whisk together until there are no lumps.
Whisk in the egg yolk, then heat until bubbling and thickened enough to coat the back of a spoon. Remove from the heat, and stir in the mashed banana and vanilla. Leave to cool to close to room temperature, stirring occasionally.
Layer the ingredients in a glass or jar. Start with the granola, then add the pudding mixture, banana slices and whipped cream (if using). Repeat.
Serve immediately or refrigerate until ready to serve. Best eaten on the day it is made.