Peel, core, and slice the apples into evenly sized pieces. Toss them with lemon juice.
Whisk the cornstarch and water together in a small bowl until smooth.
Melt the butter in a large saucepan over medium heat.
Add the brown sugar, granulated sugar, cinnamon, nutmeg, and salt. Stir until the butter melts and the mixture becomes fragrant.
Add the apples and gently stir until they are coated.
Cook over medium heat, stirring occasionally, until the apples become tender but still hold their shape.
Stir the cornstarch mixture again, then slowly add it to the saucepan while stirring.
Cook for 1 to 2 minutes, until the sauce thickens and coats the apples.
Remove from the heat and stir in the vanilla extract.
Cool for several minutes before using or storing.