Preheat your oven to 350°F (175°C).
In a large skillet, heat 2 tablespoons of olive oil over medium heat. Add the finely chopped onion and minced garlic, sautéing until translucent and fragrant.
Add the chopped spinach to the skillet and cook until wilted, approximately 5 minutes. Remove from heat and transfer the cooked spinach to a colander. Allow it to cool, then gently squeeze out any excess moisture.
In a mixing bowl, combine the drained spinach, crumbled feta cheese, ricotta cheese (if using), chopped dill, chopped parsley, dried oregano, ground nutmeg, and lemon zest (if desired). Season with salt and pepper to taste. Mix until well combined.
Lay out a sheet of phyllo dough on a baking sheet or work surface. Brush it lightly with olive oil or melted butter. Layer another sheet of phyllo dough on top and brush with oil or butter. Repeat this process with 8 sheets of phyllo dough, keeping the remaining sheets covered with a towel.
Spoon the spinach filling along the long edge of the phyllo dough, leaving a small border. Carefully roll the phyllo dough over the filling, starting from the long edge, to create a stuffed log. Tuck in the edges as you roll to secure the filling.
Repeat the filling and rolling process with the remaining phyllo dough and spinach filling to create additional logs.
Brush the tops of the spanakopita logs with olive oil or melted butter. Sprinkle breadcrumbs evenly over the tops to add texture and absorb excess moisture.
Using a sharp knife, gently score the top of each log into desired serving portions.
Place the baking sheet with the spanakopita logs in the preheated oven and bake for approximately 30-35 minutes or until the phyllo dough turns golden brown and crispy.
Once baked, remove the spanakopita from the oven and let it cool for a few minutes. Cut along the scored portions to separate them into individual servings.
Serve warm or at room temperature, and enjoy the flavours of this classic Greek dish