Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper.
In a medium bowl, mix cream cheese, spinach, feta or mozzarella, garlic powder, and onion powder until smooth.
Unfold the puff pastry on a lightly floured surface and cut it into 3-inch squares.
Spoon filling into the center of each square. Fold corners to meet in the middle and pinch to seal.
Brush each puff with beaten egg and bake for 15–18 minutes until golden and puffed.
Let cool slightly before serving. Serve warm or at room temperature.