The best thing I found is a product called SSSCAT. It is basically canned air with a motion sensor on it. When your cat gets near it, it lets out a small burst of air. I bought one a few years ago to keep our cat away from the Christmas tree.
Now if there is something I want to keep the cat away from, I just place it there for a few days. After that she’ll tend to leave it alone for a long while. She is obsessed with chewing on cords, so I just move it around the house anywhere there are cords she can get to. 90% of the time I don’t even need to turn it on. Just seeing the can keeps her away.