In a microwave-safe large mug, add 1/2 of the apple slices, 1/2 tablespoon salted butter, 1/2 tablespoon brown sugar, and 1/8 teaspoon apple pie spice. Microwave for 30 seconds to soften the apples.
In a small bowl, melt 2 tablespoons of salted butter in the microwave. Mix in 2 tablespoons of brown sugar, the milk, and the vanilla extract until combined.
To the same bowl, add the flour, baking powder, and 1/4 teaspoon apple pie spice. Mix until combined. Pour the batter over the apples in the mug.
Add the remaining apple slices on top of the batter in the mug and sprinkle with 1/2 tablespoon brown sugar and 1/8 teaspoon apple pie spice. Top with 1/2 tablespoon of salted butter.
Microwave the mug for 1 minute 30 seconds to 2 minutes, or until the cake has puffed up and set.
Garnish with a drizzle of caramel sauce and a scoop of vanilla ice cream, if desired.