Start by preheating your oven to 400°F (200°C). Slice the top off the garlic bulb, drizzle it with olive oil, sprinkle a pinch of salt, and wrap it in foil. Roast the garlic in the oven for about 30 minutes until it becomes soft and sweetly fragrant.
Once the roasted garlic cools, squeeze out the cloves (this part is so satisfying!) and mash them into a paste. Mix the garlic paste with finely chopped fresh rosemary to create a heavenly spread.
Roll out your thawed puff pastry on a clean surface. Spread the garlic-rosemary mixture across the pastry, leaving about an inch around the edges. Sprinkle generously with grated Gruyère cheese and season with a touch of black pepper. Fold the pastry over to create a parcel and press the edges gently to seal.
Transfer your pastry onto a parchment-lined baking sheet. Brush the top with beaten egg to give it that gorgeous golden hue as it bakes. Bake for 20-25 minutes until the pastry is puffed and golden brown.