Whisk together the sugar, cornstarch, and salt in a medium saucepan until fully blended.
Add the whole milk, egg yolks, and vanilla extract, whisking until the mixture is smooth.
Cook over medium heat, whisking constantly, until the pudding bubbles and thickens, about 6–8 minutes.
Remove from heat and immediately transfer the thick pudding into serving bowls or a larger dish.
Chill the pudding until it reaches your desired temperature.
Just before serving, slice fresh bananas and arrange them on top of the pudding.