Preheat your oven to 350°F (175°C). Grease and line a 9x13-inch baking pan with parchment paper, leaving a slight overhang on the sides.
Peel, core, and dice your apples into roughly 1/2-inch cubes. If needed, toss with a teaspoon of lemon juice to prevent browning.
In a medium bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
In a large bowl, beat the softened butter and sugar with an electric mixer until light and fluffy, about 3-4 minutes.
Beat in the eggs one at a time, ensuring each is fully incorporated before adding the next. Mix in the vanilla extract and sour cream until just combined.
Gradually fold the dry ingredients into the wet mixture, mixing just until no flour pockets remain.
Gently fold in the diced apples, ensuring they're evenly distributed throughout the batter.
In a small bowl, combine the flour, brown sugar, and cinnamon for the streusel. Add the cold cubed butter and use your fingers or a pastry cutter to work the mixture until it resembles coarse crumbs. Mix in the optional nuts.
Spread the batter evenly in your prepared baking pan, then sprinkle the streusel topping uniformly over the surface.
Bake for 35-40 minutes, or until a toothpick inserted in the center comes out clean with a few moist crumbs.
Allow the cake to cool in the pan for 15 minutes, then use the parchment overhang to lift it onto a cooling rack. Let cool for another 15 minutes.
If adding the optional glaze, whisk together the powdered sugar, milk or apple cider, and vanilla until smooth, then drizzle over the cooled cake.