Sweat the onion and garlic with a 3-finger pinch of salt in the olive oil over a medium heat in a nonreactive 2-quart saucepan until translucent, about 2 minutes. Add the Fresno chili, ancho chili, and red pepper flakes. Cook for a minute or two. Add the brown sugar, cumin, cinnamon, tomato paste, and vinegar and simmer for 10 minutes. Add 3 cups water, bring to a gentle simmer, and cook over low heat for 2 hours.
Remove from the heat and let cook for 15 minutes. Discard the cinnamon stick. Puree the mixture in a blender and strain through a sieve, pushing any solids through. Let cool, then cover, and refrigerator for up to one month.