Prepare the spinach filling: Heat olive oil in a large skillet over medium heat. Sauté the diced onion until translucent and fragrant, about 4–5 minutes. Add minced garlic and cook for another minute. Add the chopped spinach, parsley, and dill, and cook until the spinach wilts and excess moisture evaporates, stirring frequently. Remove from heat and let the mixture cool slightly.
Mix the filling: In a large bowl, combine the cooled spinach mixture with crumbled feta and beaten eggs. Season with salt and pepper to taste. Mix gently until well incorporated. Be careful not to overmix, as you want the texture to stay slightly chunky.
Prepare the phyllo layers: Preheat the oven to 350°F (175°C). Brush a baking dish lightly with melted butter. Lay one sheet of phyllo dough in the dish and brush generously with melted butter. Repeat with 3–4 sheets, layering and brushing each sheet.
Add the filling: Spread the spinach and feta mixture evenly over the phyllo base. Cover with the remaining phyllo sheets, again brushing each sheet with melted butter. Tuck in the edges for a neat, sealed pie.
Bake the spanakopita: Place the dish in the preheated oven and bake for 35–40 minutes, until the phyllo is golden brown and crisp. Remove from the oven and let it cool slightly for easier slicing.
Serve: Slice into squares or triangles. Serve warm as an appetizer or alongside a fresh Greek salad. You can also enjoy leftovers at room temperature—it keeps its flavor and crispiness beautifully.