Add lemon juice to apples in a medium bowl and combine. Transfer to a medium pot, add brown sugar, cinnamon, vanilla extract, nutmeg, cardamom, ginger if using, and pinch of fine sea salt; heat over medium heat, stirring occasionally. When the apples release liquid, reduce the heat to medium-low and simmer for another 15 minutes, stirring occasionally, until the apples have softened. Taste and adjust the spices as needed.
Add a tablespoon or two of water if needed. Once the apples have softened to your liking, remove them from the heat and allow them to cool slightly. Serve warm or cool.
Notes
Store the apple compote, once cooled, in the fridge, in an airtight container or mason jar for up to 5 days.
Stir the compote as it is cooking to prevent burning. Add one to two tablespoons of water (or apple cider) to keep the apple mixture from drying up and sticking to the saucepan.
If your apples are juicier than expected, leave the lid off while you cook the compote to allow some of the juices to boil off.
For a thicker compote, stir in a teaspoon of cornstarch in the liquid while the compote cooks to thicken it.
Adjust the amounts of lemon juice and spices to suit your taste. Taste while the apple compote cooks and near the end; adjust the flavoring as needed. If you like a stronger lemon flavor, add a splash of fresh lemon juice when you take the apple compote off the heat.
Once the apples have softened to your liking, remove the apple compote from the heat and let it cool slightly before serving. Avoid overcooking; otherwise, the apples will become mushy.
If your cooking range runs hot, reduce the heat slightly and cover the apple compote while it cooks. If you want more moisture to cook off, remove the cover.