Wash the chili peppers and remove stems. In a skillet, heat olive oil over medium heat and sauté the peppers and garlic until softened, about 5 minutes. Transfer the sautéed mixture to a blender, add vinegar, salt, sugar (if using), and water. Blend until smooth. Pour the mixture into a saucepan and simmer on low heat for 10 minutes to meld flavors. Let it cool before bottling. Store in a clean jar or bottle in the refrigerator for up to 4 weeks.