Preheat oven to 400°F (200°C) and line a baking sheet with parchment paper.
Lay out puff pastry sheets on a lightly floured surface. Thaw first if frozen.
Place sliced ham and 1-2 tablespoons of shredded cheese on half of each pastry square, leaving a border around the edge.
Brush edges with beaten egg, fold pastry over to form a pocket, and press edges with a fork to seal.
Place sealed pockets on parchment-lined baking sheet and brush tops with remaining beaten egg.
Bake in preheated oven for 20–25 minutes until golden brown and puffed up.
Cool slightly before serving.
Notes
Store leftovers in an airtight container in the fridge for up to 3 days. Reheat in oven for best crispiness. Can be frozen baked, wrapped and reheated later.