you’ll want to thinly slice them, put them in a pan with either butter or olive oil, a pinch of salt and a pinch of sugar and cook low and slow until they are golden brown and super soft. Here’s a great tutorial for you
assemble the sandwich
shmear the pumpkin butter (or apple butter or honey) on both sides of the bread
place a piece of cheese on next
then layer the apples and caramelized onions
then layer more cheese
place second piece of bread on top
smear the outside of the bread with the butter and place in a pan over medium high heat
press down on the sandwich with a spatula or heavy pan or aluminum foil wrapped brick...you want to smash the sandwich and get it the outside crispy
once golden and brown on one side, flip over and smash down the other side, then cover for a few minutes on lower heat to make sure everything is melty and hot on the inside.