Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper.
On a lightly floured surface, roll out the thawed puff pastry sheet to smooth it out. Cut the pastry into 2-inch squares.
Place a cube of Brie cheese in the center of each pastry square.
Top the Brie with about 1 teaspoon of cranberry sauce.
If using, sprinkle a little chopped rosemary on top of the cranberry sauce.
Fold the corners of the pastry squares over the filling to create a pocket and pinch to seal.
Place the filled pastry bites on the prepared baking sheet, seam side down.
Brush the tops of the pastry bites with the beaten egg and sprinkle lightly with sea salt.
Bake in the preheated oven for 15-20 minutes, or until the pastry is golden brown and puffed.
Remove from the oven and let cool slightly before serving.