There's a specific tool for this. It works similarly to a spoon or knife, but it reduces the odds of cracking the jar or slipping and putting a knife through your hand.
I've got one in my kitchen drawer, and it works well. Occasionally you get a jar where the gap between the lid and the jar is too narrow for the tool to slot in, but that's rare.
https://avantihomewares.com/jar-opener-blue/
I've got one in my kitchen drawer, and it works well. Occasionally you get a jar where the gap between the lid and the jar is too narrow for the tool to slot in, but that's rare.