Defrost puff pastry according to package directions. (Most need to defrost at room temperature for 40 minutes, until they can be easily rolled out.)
While puff pastry defrosts, caramelize onions (you can also do this up to a week ahead). Heat oil in a large saute pan over high heat. Add onions and stir to coat in oil. Cook onions over high heat until they start to soften and break down, ~5 minutes. Reduce heat to medium and continue to cook onions, stirring every few minutes, until deep golden brown, ~30 minutes more. (If onions appear dry while cooking, add an extra splash of oil.) Stir in butter, sugar and salt and continue cooking until sugar is fully dissolved.
Heat oven to 400 degrees F.
Spray a mini muffin tin (this makes 24 pastry bites, so bake in rounds if your mini muffin tin only has 12 spaces) with nonstick cooking spray. Slice puff pastry into 24 even squares.
Place one puff pastry square into each space in the mini muffin tin.
Fill each pastry square with 1/2 tsp fruit spread, 2 tsp of grated cheese and then 1 tsp caramelized onions (no need to be super precise about these measurements, just don't overfill the puff pastry because it will expand as it cooks).
Bake until pastry is golden brown and cheese is melted, 15 to 17 minutes.
Let pastry bites cool completely before serving. Enjoy!