Clean the raspberries well (if using fresh) in a bath of salt water or vinegar. Rinse well.
In a small saucepan, combine sugar, water, and raspberries. Heat over medium-high heat until simmering, stirring occasionally. Simmer for 5-7 minutes until the berries have disintegrated into seeds.
Remove from heat and strain out the berries and seeds through a fine-mesh sieve. Use a spoon to stir the mixture to release the syrup as needed, being careful to not let any seeds or fruit bits into the syrup. Discard the seeds.
Optional: stir in a squeeze of fresh lemon juice to bring out the berry flavor if it's tasting flat; it's not about adding lemon flavor but rather enhancing the raspberry notes.
Let cool as needed and use immediately or store in an airtight container in the fridge for up to 2 weeks.