In a large skillet over medium heat, add a tablespoon of olive oil. Once hot, add the chopped onion and sauté until translucent, about 5-7 minutes. Stir in the minced garlic and cook for an additional minute.
Add the chopped spinach to the skillet and cook until wilted, about 4-5 minutes. Remove from heat and let cool slightly.
In a mixing bowl, combine the cooled spinach mixture with feta, ricotta, Parmesan, eggs, dill, salt, and pepper. Mix until well combined.
Unroll the phyllo sheets and cover with a damp cloth. Brush a baking dish with olive oil and layer 6-8 sheets of phyllo, brushing each with olive oil.
Spoon the spinach filling over the phyllo base and spread evenly. Fold overhanging edges of phyllo over the filling.
Layer more phyllo sheets on top, brushing each with olive oil, and trim excess phyllo. Cut slits in the top layers.
Bake for 30-40 minutes until golden brown and crispy. Let cool before slicing and serving.
Notes
Serve warm with tzatziki or a fresh salad. Spanakopita can be made ahead and stored in the refrigerator or freezer.