In a medium saucepan, combine raspberries, granulated sugar, and 1/4 cup water. Stir to mix.
Heat the mixture over medium heat, stirring occasionally, until the raspberries release their juices (about 5-7 minutes).
In a small bowl, mix cornstarch with 2 tablespoons of water to create a slurry.
Slowly pour the cornstarch slurry into the saucepan, stirring constantly to avoid lumps.
Cook for an additional 1-2 minutes until the sauce thickens and can coat the back of a spoon.
Remove the sauce from heat and stir in vanilla extract.
Optional: For a smooth sauce, strain through a fine-mesh sieve to remove seeds.
Allow the sauce to cool before serving.