Preheat the oven to 190°C (375°F).
In a bowl, combine the mashed squash, garlic, and rosemary. Season with salt and pepper, then mash together with a fork until smooth.
Unroll the puff pastry on a clean surface.
Spread the squash mixture evenly over the pastry, then roll it up tightly along the long edge.
Slice the roll into 1.5 cm rounds using a sharp knife or pizza cutter.
Place the slices on a lined baking sheet, leaving space between each one.
Bake for 15 minutes, or until golden and puffed up.
Transfer to a wire rack to cool slightly before serving.
For an air fryer version, cook the rolls at 180°C (355°F) for about 10 minutes, or until crisp and golden.