Prepare the oven. Preheat the oven to 350°F.
Prepare the pan. Grease a 9 × 13-inch baking pan and line the bottom with parchment paper if desired.
Mix the dry ingredients. Whisk together the flour, baking powder, baking soda, cinnamon, and salt.
Prepare the apples. Peel, core, and dice the apples into about 1/2-inch pieces. Toss them with 1 tablespoon of the flour mixture.
Cream the butter and sugars. Beat the softened butter, brown sugar, and granulated sugar until lighter and creamy, about 2–3 minutes.
Add the eggs. Beat in the eggs one at a time.
Add the remaining wet ingredients. Mix in the vanilla and sour cream, then add the milk and mix until combined.
Combine the batter. Add the dry ingredients to the wet mixture and fold gently until the flour is mostly incorporated.
Fold in the apples. Gently fold the diced apples into the batter until evenly distributed.
Fill the pan. Spread the batter evenly in the prepared baking pan.
Bake. Bake at 350°F for 35–42 minutes, until the top is golden and a toothpick inserted into the center comes out with a few moist crumbs but no wet batter.
Cool the cake. Let the cake cool in the pan for about 20 minutes.
Make the caramel. Melt the butter and brown sugar in a small saucepan over medium heat. Bring to a gentle simmer and cook for about 2 minutes, stirring frequently.
Finish the caramel glaze. Remove from the heat and carefully stir in the heavy cream, vanilla, and salt until smooth. Let it cool for 2–3 minutes.
Glaze the cake. Pour the caramel evenly over the warm cake and let it settle for several minutes before slicing.