In a medium saucepan, whisk together sugar, flour, and salt. In a medium bowl, whisk together milk and egg yolks until smooth. Add egg mixture to sugar mixture, whisking until combined. Cook over medium heat, whisking constantly, for 8 to 10 minutes or until mixture is very thick.
Remove from heat. Whisk in vanilla and butter until melted and smooth. Spoon mixture into a bowl; cover with plastic wrap, pressing directly on surface of pudding. Chill for at least 4 hours.
In a trifle dish or serving bowl, layer vanilla wafers, pudding mixture, bananas, and whipped topping as desired. Store, covered, in refrigerator for up to 2 days.
Recipe by Paula Deen Magazine at https://www.pauladeenmagazine.com/cooked-custard-banana-pudding-recipe/