Prep your ingredients. Slice the onions thinly, dice the potatoes into small cubes, halve the tomatoes, and mince the garlic.
Have eggs and herbs ready. Smaller potato cubes cook faster and crisp better.
Start the onions. Heat a large skillet over medium-low. Add olive oil (and butter, if using), then the onions and a pinch of salt.
Cook slowly, stirring occasionally, for 15–20 minutes until deep golden and sweet. Don’t rush this step.
Add the potatoes. Push the onions to one side. Add a drizzle more oil if needed, then the potatoes in a single layer.
Season with salt, pepper, and smoked paprika. Cook 8–10 minutes, stirring every few minutes, until tender with crispy edges.
Build flavor with garlic and tomatoes. Stir in the garlic and cook 30 seconds until fragrant. Add the tomatoes and a pinch of chili flakes if you like heat.
Cook 2–3 minutes until the tomatoes soften and release juices.
Balance with acidity. Add a splash of vinegar or a squeeze of lemon. This brightens the sweet onions and keeps the dish from tasting heavy.
Create wells for the eggs. Use a spoon to make 4–6 small spaces in the mixture. Crack an egg into each well.
Season eggs with a little salt and pepper.
Cook the eggs gently. Reduce heat to low. Cover the pan and cook 4–7 minutes, depending on how you like your yolks. For runny yolks, start checking at 4 minutes; for set yolks, go a bit longer.
Finish with herbs and cheese. Turn off the heat.
Sprinkle chopped herbs over the top and add crumbled feta or grated cheese if using. The residual heat will soften the cheese without overcooking the eggs.
Serve hot. Scoop into bowls or bring the skillet to the table. Add extra black pepper or a drizzle of olive oil if you like.