Prepare the oven and pan: Preheat the oven to 350°F (175°C). Grease a 9-inch square baking pan and line the bottom with parchment paper if desired.
Mix the dry ingredients: Whisk together the flour, baking powder, baking soda, and salt in a medium bowl
Prepare the filling: In a small bowl, combine the brown sugar, flour, and cinnamon.
Prepare the crumb topping: Mix the brown sugar, chopped nuts, cinnamon, and flour. Cut in the cold butter until coarse crumbs form.
Cream the butter and sugar: Beat the softened butter and granulated sugar for 2 to 3 minutes, until light and fluffy.
Add the eggs and vanilla: Beat in the eggs one at a time, then mix in the vanilla extract.
Finish the batter: Add the dry ingredients alternately with the sour cream, beginning and ending with the dry ingredients. Mix just until combined. Do not overmix.
Layer the cake: Spread half of the batter into the prepared pan. Sprinkle the cinnamon filling evenly over the batter.
Add the remaining batter: Carefully spread the remaining batter over the cinnamon layer.
Add the topping: Sprinkle the cinnamon crumb mixture evenly over the top.
Bake: Bake for 40 to 50 minutes, or until the center is set and a toothpick inserted into the middle comes out with a few moist crumbs.
Cool: Let the cake cool in the pan for 20 to 30 minutes before slicing and serving.