Heat a drizzle of olive oil in a skillet over medium heat. Sauté diced onion and minced garlic for 3 to 4 minutes until soft and fragrant.
Add frozen spinach, salt, pepper, and one-third cup of water. Simmer and stir until spinach is fully cooked and all water has evaporated.
Remove filling from heat and allow to cool completely. Speed this up by spreading it on a plate and placing it in the freezer for 5 minutes.
Preheat oven to 350°F. Line a baking sheet with parchment paper.
Once filling is fully cooled, stir in crumbled feta, shredded mozzarella, egg white, and dried herbs. Mix until well combined.
Unroll puff pastry onto a lightly floured surface and cut in half vertically to make two equal rectangles.
Spread filling evenly over one pastry half. Place the second half directly on top and press gently to seal.
Cut the filled pastry lengthwise down the middle, then cut across 6 times to create 12 equal squares.
Turn each square diagonally into a diamond position. Arrange in two rows of 6 on the prepared baking sheet with corners of each row just touching.
Brush tops generously with egg yolk. Sprinkle with nigella seeds or sesame seeds.
Bake for 28 to 30 minutes until deeply golden brown and puffed. Serve hot or at room temperature.