Preheat oven to 350 degrees F. Butter a 9-inch round by 3-inch deep cake pan (preferably with a removable bottom) or 9-inch square cake pan (see notes); line bottom with parchment paper.
In a small bowl, whisk together sugar and cinnamon and set aside along with chopped nuts.
In a mixing bowl or the bowl of a stand mixer fitted with the paddle attachment, cream butter and sugar together until fluffy, 2 to 3 minutes. Add eggs, one at a time, mixing well after each addition.
In a small bowl, mix baking soda in with sour cream (it will fizz and get a bit bubbly), then mix baking powder and salt in with flour in another bowl until evenly incorporated.
Alternate adding half of sour cream to batter, followed by half of flour mixture, mixing well after each addition. Scrape down the sides of the bowl, then repeat with remaining sour cream and flour until just incorporated. Mix in vanilla extract, then fold in apples until evenly distributed.
Spread half of the batter into prepared cake pan. Sprinkle with half of cinnamon sugar mixture and half of chopped nuts; gently swirl a few strokes through the batter with a knife. Top with remaining batter, then sprinkle with remaining sugar and nuts and swirl once again.
Bake for about 50 minutes or until top is golden brown and a toothpick inserted near the center comes out clean.
Place pan on a wire rack to cool. Run a knife around the edge to release, then remove from pan and cool completely. Cake will keep, covered in an airtight container, for up to 3 days.
Notes
If using a 9-inch square pan or a shallower cake pan, you might not use all the batter (don't fill it more than 2/3 full). Also, your cake will likely be done sooner, so start checking after 30-35 minutes.