If you are using dried red chili peppers, soak them in hot water for 20 minutes to soften. Drain and remove the stems and seeds. For fresh peppers, skip this step and proceed directly to the next.
In a blender or food processor, combine the chili peppers, minced garlic, chopped onion, and grated ginger. Blend until you achieve a smooth paste-like consistency.
Transfer the chili paste to a saucepan and add the apple cider vinegar, soy sauce, white sugar, and salt. Stir well to combine all the ingredients.
Place the saucepan over medium heat and bring the mixture to a gentle boil. Reduce the heat to low and let it simmer for 10 minutes, allowing the flavors to meld together.
In a separate bowl, dissolve the cornstarch in water to make a slurry. Slowly pour the slurry into the simmering sauce while stirring continuously.
Continue cooking the sauce for an additional 5 minutes, or until it reaches the desired consistency. If the sauce is too thick, add more water; if it is too thin, cook for a few minutes longer.