Preheat your oven to 180°C (350°F) and lightly grease your baking dish.
In a large skillet, heat olive oil over medium heat, then add minced garlic. Sauté for about 30 seconds until fragrant and slightly golden.
Add the chopped spinach to the skillet. Cook, stirring constantly, until wilted and bright green, about 2-3 minutes. If using frozen spinach, make sure to squeeze out excess moisture before adding.
Transfer the cooked spinach to a mixing bowl and let it cool slightly. In the same bowl, whisk together ricotta, beaten eggs, lemon zest (if using), salt, and pepper until smooth.
Stir the wilted spinach into the ricotta mixture, ensuring even distribution. The mixture should be creamy with some vibrant green bits.
Pour the mixture into your prepared baking dish and spread it evenly with a spatula. Sprinkle the shredded mozzarella generously over the top for a cheesy crust.
Bake uncovered for 25-30 minutes, until the top is bubbling and golden brown, and the edges are crispy.
Remove from the oven and let it rest for about 5 minutes. This helps it set and makes slicing easier.
Slice into portions and serve warm, optionally drizzled with a little extra olive oil or sprinkled with fresh herbs for added flavor.