Prep the cherries: Wash, stem, and pit fresh cherries, then halve them. For pie, cut some into quarters. If using frozen cherries, use straight from frozen or rinse off excess ice. If using canned cherries, drain and save ½ cup juice.
Mix the thickener: In a small bowl, whisk together the sugar and cornstarch to help prevent clumps.
Combine in saucepan: Add cherries, sugar-cornstarch mixture, lemon juice, salt, and water or reserved cherry juice to a medium saucepan.
Cook and thicken: Cook over medium heat, stirring often, until the cherries release juice and the mixture starts bubbling. Reduce heat and simmer 8–10 minutes until thick, glossy, and syrupy.
Add flavor: Remove from heat, then stir in vanilla extract, lemon zest, and almond extract if using. Taste and adjust with a little lemon juice or sugar if needed.
Cool before using: Let cool 10–15 minutes for toppings, or cool completely before using in pie. The filling will thicken more as it rests.