Make the salsa ranchera: Heat the oil in a skillet over medium heat. Add the chopped onion and cook until soft and translucent, about 3–4 minutes. Stir in the garlic and chopped pepper and cook for another minute until fragrant.
Add the diced tomatoes with their juices, cumin, smoked paprika, salt, and pepper. Simmer the sauce over low heat for about 10–12 minutes, stirring occasionally, until slightly thickened. Taste and adjust seasoning, adding a pinch of sugar if the tomatoes are too acidic.
Warm or crisp the tortillas: In a separate skillet, heat a thin layer of oil over medium-high heat. Fry each corn tortilla for about 30 seconds per side until just crisp and warm, then drain on paper towels. Alternatively, you can warm tortillas in a dry skillet or microwave if you prefer them soft rather than crisp.
Cook the eggs: In the same skillet used for tortillas, add a little more oil if needed and crack in the eggs. Cook sunny-side up or over-easy until the whites are set but the yolks remain runny, about 2–3 minutes. Season eggs with a pinch of salt and pepper.
Assemble the huevos rancheros: Place one tortilla on each plate. Spoon a generous amount of salsa ranchera over the tortilla. Top each with a cooked egg.
Garnish: Add crumbled queso, chopped cilantro, avocado slices, and a squeeze of lime if desired. Serve immediately while hot.