01 - Preheat oven to 350°F. Grease a 9-inch square baking pan or line it with parchment paper.
02 - Whisk together flour, baking powder, baking soda, and salt in a medium bowl and set aside.
03 - In a large bowl, beat softened butter and granulated sugar until light and fluffy.
04 - Add eggs one at a time to the butter mixture, mixing after each addition, then blend in vanilla extract.
05 - Mix sour cream into the wet mixture until fully combined.
06 - Gradually fold the dry ingredients into the wet mixture until just combined, avoiding overmixing.
07 - In a separate bowl, mix brown sugar, flour, and cinnamon. Stir in melted butter until crumbly. Add nuts if desired.
08 - Spread half of the batter evenly in the pan, sprinkle half of the streusel over it, then layer the remaining batter and top with remaining streusel.
09 - Bake for 35 to 40 minutes, or until a toothpick inserted in the center comes out clean.
10 - Allow to cool in the pan for 15 minutes before slicing and serving.