Preheat and Prepare: Preheat your oven to 400°F (200°C). Line two large baking sheets with parchment paper.
Sauté Aromatics: Heat olive oil in a large skillet over medium heat. Add the diced onion and cook until translucent (about 4 minutes). Stir in the minced garlic and cook for another 30 seconds until fragrant.
Wilt the Spinach: Add the spinach to the skillet in batches, stirring until completely wilted.
Remove Moisture (Crucial Step): Transfer the cooked spinach mixture to a fine-mesh sieve or a clean kitchen towel. Squeeze firmly to remove all excess liquid. The mixture should be very dry.
Mix the Filling: In a medium bowl, combine the dried spinach mixture, crumbled feta, chopped dill, and black pepper. Stir until well incorporated.
Prepare Pastry: On a lightly floured surface, unfold the puff pastry sheets. Roll slightly to even out. Cut each sheet into 6 equal squares (12 total).
Assemble: Place 1 generous tablespoon of filling in the center of each square. Fold the pastry over to form a triangle.
Seal: Press the edges firmly with your fingers, then use the tines of a fork to crimp the edges, ensuring a tight seal.
Finish and Bake: Place pastries on the prepared baking sheets. Brush the tops evenly with the egg wash. Bake for 18–20 minutes, or until the pastries are puffed and a deep golden brown.
Serve: Allow to cool for 5 minutes on a wire rack before serving.