In a medium saucepan over medium heat, combine the chopped strawberries and sugar. Cook, stirring frequently, for about 4–5 minutes, until the strawberries begin releasing their juices.
Stir in the lemon juice and continue to cook for another 2 minutes. Gently mash some of the strawberries with a spoon or potato masher to help break them down.
In a small bowl, whisk together the cornstarch and water to form a slurry. Slowly pour the slurry into the strawberry mixture while stirring constantly. Let it simmer for 2–3 minutes until thickened to a jam-like consistency.
Remove from heat and stir in the vanilla extract, if using.
Transfer the mixture to a bowl and let it cool to room temperature. Then refrigerate for at least 30 minutes, or until fully chilled and set.
Notes
Refrigerator: Store the strawberry cake filling in an airtight container in the refrigerator for up to 5 days.
Freezer: You can also freeze strawberry filling for cake in a freezer bag for up to 6 months. Press out the excess air before freezing and thaw in the refrigerator before using.
Makes enough for one 8- or 9-inch layer cake or for filling + topping.