In a small saucepan, combine sugar, vinegar, water, salt, garlic, and chili flakes.
Bring to a boil over medium heat, stirring until sugar dissolves.
Reduce the heat and simmer for 3–5 minutes to let the flavors develop.
Mix 2 tablespoons of cornstarch with 2 tablespoons of water in a small bowl to create a slurry.
Slowly pour the slurry into the saucepan, stirring constantly to thicken the sauce.
Simmer for another 2–3 minutes, or until it reaches a glossy, syrup-like consistency.
Let it cool completely, then transfer to a clean jar. Store in the fridge for up to 2–3 weeks.