Heat olive oil in a skillet over medium heat.
Sauté onions until translucent (2–3 minutes), then add garlic and cook for 30 seconds.
Stir in diced tomatoes and jalapeño. Let simmer for 10 minutes, stirring occasionally.
Add cumin, smoked paprika, salt, and pepper. Simmer for 5 more minutes until the sauce thickens.
Stir in lime juice and fresh cilantro. Keep warm.
Heat ¼ inch of vegetable oil in a skillet over medium-high heat.
Fry tortillas one at a time until golden and crispy (1–2 minutes per side).
Transfer to a paper towel-lined plate and cover with foil to keep warm.
Heat a small amount of oil in a clean skillet over medium heat.
Crack eggs into the skillet and fry until whites are set, and yolks are runny (2–3 minutes). For firmer yolks, cover the skillet and cook an extra minute.
Place a tortilla on each plate. Spread refried beans (optional) over the tortilla.
Add a fried egg on top of each tortilla.
Spoon warm ranchero sauce generously over the eggs.
Top with crumbled queso fresco, sliced avocado, and hot sauce if desired.