Preheat the oven to 350°F (175°C). Grease a 9×5-inch loaf pan and line it with parchment paper.
In a medium bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
In a large bowl, beat the softened butter, granulated sugar, and brown sugar until creamy and well combined.
Add the eggs one at a time, mixing well after each addition. Stir in the vanilla.
Add the sourdough discard and milk. Mix until smooth and combined.
Gradually add the dry ingredients to the wet ingredients. Stir gently just until no dry streaks of flour remain.
Fold in the diced apples and chopped nuts, if using. Avoid overmixing the batter.
Transfer the batter to the prepared loaf pan and smooth the top.
Combine the sugar and cinnamon for the topping and sprinkle it evenly over the batter.
Bake for 50–60 minutes, or until the loaf is golden and a toothpick inserted into the center comes out clean or with a few moist crumbs.
Cool in the pan for about 15 minutes, then transfer the loaf to a wire rack and let it cool before slicing.