I can only speak about my cat, for whom the solution has been mostly to make sure he has sufficient fresh scratching cardboard.
Trimming claws helps but he doesn’t like it. I get a partner to distract him, but mostly he keeps his claws in good, if sharp, order.
If the scratch pads are too dusty or too used, he’ll start favoring the sofa, but sometimes he’ll do that for sake of mischief, getting away with something. He seems to like to test that we’re paying attention.