We would suppose (reading the official novelisation) that it was Han's Medal of Bravery...
Chewie was lifting Rose off her feet when Finn saw Maz interrupt.
“Chewie!” she called, motioning for the Wookiee to bend over. “This is
for you.” He got down on one knee, and when they were of a height, she
placed Han’s Medal of Bravery in Chewie’s hand and closed his huge
fingers around it. “He’d want you to have it,” she added.
Star Wars: The Rise of Skywalker: Expanded Edition
... But it was revealed in Star Wars: Force Collector that is was, in fact Luke's Medal of Bravery, awarded to him after the Battle of Yavin. Han Solo swiped it (presumably after Luke left it lying around on the Falcon!), then used it to pay his bar tab to Maz Kanata.
He tried to obey. “Two men. One taller, with darker hair. One smaller and younger. This belonged to…it belonged to Skywalker.” That name again! “It was put on his neck…around his neck. A woman put it there. She had dark hair, in a long braid. There was a battle, and he was a hero. It was given to him for bravery, and in thanks for his service.”
Maz interrupted, “Wait. You say it was Skywalker’s? Are you sure?”
“Karr,” she said, using his name at last. “What I’m trying to say is that the swindler swindled me. He told me that the medal was his own, but he gave me his friend’s instead. They all fought at the Battle of Yavin and were rewarded together—along with a very handsome Wookiee who would never cheat me in such a fashion, nor would he allow it to occur if he’d been aware of it. We’re very fond of one another, and he would not treat me so badly. Don’t let anyone tell you different.”
Star Wars: Force Collector