Add the raspberries, granulated sugar, lemon juice and lemon zest to a medium saucepan. Stir gently to combine.
Place over medium heat and bring to a gentle simmer. Cook for 10–15 minutes, stirring occasionally, until the raspberries have softened and released their juices. Continue cooking until the juices have reduced slightly and the compote has a loose, spoonable consistency.
Remove from the heat and allow the compote to cool completely. It will continue to thicken as it cools. Store in an airtight container in the refrigerator for up to 5–7 days.