Preheat oven to 350°F (175°C).
Grease a 9x5-inch loaf pan or line it with parchment paper.
In a bowl, whisk together flour, baking soda, salt, and cinnamon. Set aside.
In another bowl, beat butter and sugar until light and fluffy.
Add eggs, one at a time, mixing well after each.
Stir in vanilla extract.
Mix in mashed bananas and sour cream (or yogurt).
Gradually fold in the dry ingredients until just combined (do not overmix).
Optional: Fold in walnuts or chocolate chips.
Pour batter into the prepared loaf pan.
Bake for 55-65 minutes, or until a toothpick inserted comes out clean.
Let cool in the pan for 10 minutes, then transfer to a wire rack.