To make banana pudding, in a large saucepan, mix together sugar, flour, and salt. Whisk them together till they combine properly.
Thereafter, gradually pour in the milk and whisk it properly along with the blended mixture of salt, flour, and sugar. Continue to do so till you get a smooth consistency.
Now place the saucepan over medium heat and let the mixture thicken. Allow the milk mixture to heat up, stirring it regularly, until it develops a thick 'creamy-salad-dressing' consistency. Ensure it gently bubbles for about 12 to 15 minutes and do not forget to stir the mixture during this process.
Once done, remove the saucepan from the stove where it had been heating earlier. In a separate medium-sized bowl, place the 4 egg yolks and whisk them vigorously. While doing so, slowly pour in the milk mixture. Once done, pour in the mixture into a saucepan and allow it to heat over medium heat. This time, it will have a pale yellow shade and will have a consistency of something resembling heavy cream. Keep stirring the mixture over medium heat and allow it to cook this way for two more minutes before removing it from heat.
Now add in the vanilla extract and butter to the mixture until it is properly melted and mixed. At this point in time, the mixture will resemble a salad-dressing consistency and have a darker yellow shade.
It is now time to create the first cookie layer. Sprinkle half of the coarsely crumbled wafers into a 2-quart baking dish or a 6-ounce mason jar. Over this layer, place the banana slices. Thereafter, spread a layer of the warm pudding over the bananas. Repeat this entire process of layering one more time with the remaining wafers, banana, and pudding.
Now use a plastic wrap to cover the jars individually. Ensure you directly press the plastic wrap onto the pudding so that it doesn't form a skin on top. Put the jars/glasses with the plastic wrap in the refrigerator and allow it to cool for at least 2 hours. Once done, garnish it with whipped cream or meringue, or more crumbled cookies and bananas if you so desire. Enjoy!