Preheat your oven to 350°F (175°C). Line a 9-inch square baking pan with parchment paper or grease it well with butter. This prevents the cake from sticking and ensures even browning on the sides.
Make the streusel topping first: In a small bowl, whisk together 1/2 cup all-purpose flour, 1/2 cup packed brown sugar, 1 teaspoon ground cinnamon, and 1/4 teaspoon salt. Mix for 30 seconds until the brown sugar breaks up.
Add 1/4 cup cold unsalted butter cut into small cubes to the flour mixture. Using your fingertips (not a mixer), rub the cold butter into the flour until the mixture looks like coarse breadcrumbs or wet sand. This should take 2–3 minutes. The pieces should be no larger than a pea.
Stir 1/2 cup chopped pecans or walnuts into the streusel mixture with a fork. Set the entire bowl aside at room temperature. Checkpoint: Your streusel should look crumbly and moist, not wet or clumpy.
In a medium bowl, whisk together 2 cups all-purpose flour, 1 and 1/2 teaspoons baking powder, 1/2 teaspoon baking soda, and 1/2 teaspoon salt. Whisk for 1 minute to combine and aerate the flour. Set aside.
In a large mixing bowl, combine 1/2 cup softened unsalted butter (room temperature) and 3/4 cup granulated sugar. Using an electric mixer on medium speed, beat for 2–3 minutes until the mixture is light, fluffy, and pale (almost white). Scrape down the sides of the bowl halfway through.
Add 2 large eggs to the butter mixture one at a time. After adding the first egg, beat on medium speed for 30 seconds, then add the second egg and beat another 30 seconds. The mixture should look smooth and creamy, not curdled.
Pour in 1 teaspoon vanilla extract and beat for 20 seconds on medium speed. Scrape down the bowl.
Now add the dry ingredients and sour cream alternately, starting with dry ingredients. Add 1/3 of the dry mixture and stir on low speed for 20 seconds until just combined. Then add 1/2 of the sour cream (about 1/2 cup) and stir on low speed for 20 seconds. Repeat: add 1/3 of the remaining dry ingredients, then the last 1/2 cup sour cream, then the final 1/3 of dry ingredients. Beat on low for just 10 seconds after each addition. Do not overmix; stop as soon as you see no white flour streaks. Checkpoint: Your batter should be thick, smooth, and slightly lumpy — never runny or glossy.
Spread exactly half of the cake batter evenly into the prepared 9-inch pan using a spatula. Press gently to level the surface. This should take 1 minute.
Sprinkle half of the streusel mixture (about 1/2 cup) evenly over the bottom layer of batter. Use your fingers to break up any large clumps. You want an even, scattered layer of streusel.
Carefully spread the remaining half of the cake batter over the streusel layer using your spatula. Work slowly and gently so you don't press the streusel deep into the batter. This takes about 2 minutes.
Sprinkle the remaining streusel mixture evenly over the top of the cake. Press gently with your fingertips so it adheres to the batter slightly. Checkpoint: You should see a generous, golden-brown streusel topping covering the entire surface with no exposed cake batter visible.
Place the pan on the center rack of your preheated 350°F oven. Bake for 40–45 minutes. The cake is done when a toothpick inserted into the center comes out clean or with just a few moist crumbs (not wet batter). The top should be golden brown and firm to the touch.
Remove the pan from the oven and place it on a wire rack. Let the cake cool in the pan for 15 minutes. This prevents it from breaking apart when you remove it.
After 15 minutes, you can either serve the cake directly from the pan or run a thin knife around the edges and invert it onto a wire rack to cool completely (about 30 minutes). If serving warm from the pan, cut into squares and use a spatula to remove each piece. Checkpoint: The cake should be set enough to cut cleanly, and the streusel should feel crispy on top.
Let cool completely before storing, about 1–2 hours total. The cake tastes best served at room temperature or slightly warm.