Preheat the oven to 350°F (175°C).
Heat olive oil or butter in an oven-safe skillet over medium heat.
Sauté the diced onion for 3-4 minutes until translucent.
Add the minced garlic and sauté for an additional 1-2 minutes.
Stir in the chopped spinach and cook until wilted, about 2-3 minutes.
In a mixing bowl, whisk together the eggs, milk, salt, and pepper.
Pour the egg mixture over the sautéed vegetables in the skillet.
Sprinkle shredded cheese evenly over the top.
Transfer the skillet to the preheated oven and bake for 20-25 minutes.
Remove from the oven and let it cool for a few minutes before slicing.