Preheat oven to 400°F (200°C).
Line a baking sheet with parchment paper.
Heat olive oil in a skillet.
Sauté garlic until fragrant.
Add spinach and cook until wilted.
Remove excess moisture from spinach.
Mix spinach with ricotta and Parmesan.
Season with salt, pepper, and nutmeg.
Roll puff pastry on a flat surface.
Cut pastry into equal rectangles.
Spoon filling onto each piece.
Fold pastry and seal edges gently.
Brush tops with beaten egg.
Bake for 18–22 minutes.
Cool slightly before serving.