Preheat oven to 350°F (177°C). Grease a 9×5-inch loaf pan or line with parchment paper.
In a large bowl, whisk together flour, baking powder, baking soda, cinnamon, and salt. Set aside.
In a large mixing bowl (or bowl of a stand mixer), using a mixer and paddle attachment, beat the butter and sugar together until light and creamy (2–3 minutes).
Mix in the eggs and vanilla. Add sourdough discard and milk, beating on medium speed until combined. Don’t worry if it looks a little curdled!
Add the dry ingredients to the wet ingredients. Stir until just combined — don’t overmix.
In a small bowl, toss the chopped apples with brown sugar and cinnamon.
Pour ⅓ of the batter into your prepared loaf pan. Spoon half the apple mixture on top. Repeat with another ⅓ batter, spoon the remaining apple mixture, then the rest of the batter. Lightly swirl through the top of the dough with a knife.
Bake for 60–75 minutes, covering loosely with aluminum foil after 30 minutes to prevent over-browning. Your loaf should be golden brown and a toothpick inserted into the center should come out clean when done.
Let the bread cool completely in the pan on a wire rack before removing from the pan. Be sure not to skip this step as tempting as it may be! Your bread will fall apart if it’s still warm.
In a medium bowl, whisk together powdered sugar, melted butter, milk, and vanilla. Drizzle over the cooled loaf.