Heat 2 tbsp olive oil in a large skillet over medium heat.
Add chopped onion and diced bell pepper, stirring occasionally. Cook for 5-7 minutes, until softened and slightly caramelized.
Stir in minced garlic, cumin, smoked paprika, cayenne, and chili flakes. Let them toast for about 30 seconds to release their flavors.
Pour in the crushed tomatoes and tomato paste, stirring well.
Add salt, black pepper, and sugar (if using). If using harissa paste, mix it in now.
Let the sauce simmer on low heat for 10-15 minutes, stirring occasionally, until thickened.
Use the back of a spoon to create 4 wells in the sauce. Crack 1 egg into each well, keeping them spaced apart.
Cover the skillet with a lid and let the eggs cook on low heat for 4-6 minutes. For runny yolks, check at 4 minutes. For firmer yolks, cook an extra 2 minutes.
Once the eggs are set to your liking, sprinkle crumbled feta cheese over the dish. Garnish with chopped parsley or cilantro.
Serve the shakshuka straight from the skillet with warm bread or pita for scooping up the sauce.
For extra heat, drizzle with hot sauce or extra harissa.