Preheat the oven to 375°F (190°C). Position oven racks in the upper and lower thirds of the oven.
Place the Brie cheese in the freezer for 15 minutes to firm it up for easier cutting.
Generously grease two 24-cup mini muffin pans with nonstick cooking spray.
Lightly flour a work surface and unroll one sheet of puff pastry.
Roll it into a 10 x 14-inch rectangle.
Cut the pastry lengthwise into 4 strips, then crosswise into 6 strips to create 24 squares.
Press each square into a mini muffin cup to form a pastry shell.
Prick the bottom of each pastry cup two or three times with a fork.
Cut half of the Brie into 24 small cubes.
Place one cube of Brie into each pastry cup.
Add 1 teaspoon of cranberry sauce on top of each piece of Brie.
Sprinkle lightly with flaky sea salt and chopped pecans.
Repeat the process with the second puff pastry sheet and remaining Brie.
Place muffin pans on rimmed baking sheets to catch any overflow.
Bake for 18–20 minutes until the pastry is puffed and golden brown, rotating the pans halfway through cooking.
Allow the Cranberry Brie Bites to cool in the pans for 3 minutes.
Carefully transfer to a serving platter.
Garnish each bite with a small piece of fresh rosemary before serving.
Serve warm or at room temperature.