Preheat the oven to 375°F (190°C). Line a large baking sheet with parchment paper.
Unroll the pizza dough and cut each can into 12 equal squares, 24 pieces in total.
Place a cube of brie and about 1 1/2 teaspoons of cranberry sauce in the center of each square. Pinch the dough closed around the filling and roll it into a ball.
Arrange the balls seam-side down on the baking sheet in the shape of a Christmas tree: rows of 7, 6, 4, 3, 2, then 1 ball at the top, plus 1 ball as the trunk at the bottom — 24 balls in total. Leave a little space between balls — they will puff together as they bake.
Stir the garlic and rosemary into the melted butter and brush it over the tree. Sprinkle with flaky salt and the pecans, if using.
Bake for 20–25 minutes, until golden brown and the cheese is melted inside.
Let stand 5 minutes, then serve warm, pulling the balls apart at the table.