Combine water, vinegar, sugar, garlic, chili flakes, and salt in a small saucepan.
Bring the mixture to a gentle boil over medium heat, stirring to dissolve sugar.
Reduce heat and let it simmer for 3–4 minutes to allow flavors to blend.
Stir together cornstarch and 2 tbsp. water to make a slurry, then add to the saucepan.
Cook for 1–2 minutes until thickened, glossy, and slightly sticky; then cool and store.