Sauté the Onions: Heat the vegetable oil in a large skillet over medium heat. Add the sliced onions and cook for 10–15 minutes, stirring occasionally, until they are soft and translucent. Let them caramelize slightly, but don’t let them brown too much.
Add the Base & Seasonings: Stir in the tomato paste and ketchup. Pour in the water, followed by the brown sugar, vinegar, garlic powder, paprika, cayenne (if using), and salt. Mix everything well.
Simmer Slowly: Reduce the heat to low and simmer uncovered for 15–20 minutes. Stir occasionally to prevent sticking. The onions should be tender, and the sauce should thicken slightly.
Optional Thickening: If the sauce is too thin, mix 1 tablespoon of cornstarch with 1 tablespoon of water and stir it in. Simmer for 3–5 more minutes until the sauce reaches your desired consistency.
Cool and Store: Remove from heat. Let the sauce cool for 10–15 minutes, then transfer to a glass jar or container. Store in the fridge for up to 1 week or freeze for up to 3 months.