While your initial reaction to any situation in Baldur's Gate 3 might be the same as a lot of Dungeons & Dragons parties (that being just jumping the enemy and beating them up), you can actually deal with Yurgir in the Temple of Shar in multiple different ways rather than just fighting him. We're here to explore those.
Dealing With Yurgir
The first way to break Yurgir's contract is to convince him that you're here to help. He'll ask you to look around and figure out exactly what is going on here. Explore the western side of the room you find him in and you'll find a pit that is full of rats. Clear this pit out and you'll discover that those rats were actually Dark Justicars that had been transformed into rats in an attempt to make Yurgir's Contract last forever.
The final rat will transform into Lythridor, and you'll have to fight him to break the contract. Once you've defeated him, report back to Yurgir and you'll get a cutscene that allows you to pick up the Umbral Gem that he has on him.
The second way to easily defeat Yurgir is to persuade him to kill himself. There's a series of high DC checks here that will be tough for anybody, so make saves after each roll. Firstly you persuade him to get rid of his minions, then you persuade him to get rid of his Displacer Beast and finally, you persuade him to get rid of himself which will satisfy Raphael.