A cat may be shaking its legs repeatedly due to the following reasons:
Cleaning paws: Cats have a habit of licking their fur to keep themselves clean. Shaking their paws may be the cat trying to remove any saliva or fur left on its paws after licking them.
Playing or excited: When playing or excited, cats may shake their paws to express their emotions. This behavior is similar to a human waving or jumping.

Anxiety or restlessness: When a cat is anxious or restless, it may exhibit leg-shaking behavior. This may be because the cat is feeling tense and is trying to release stress by shaking its legs.
If your cat keeps shaking its paws, you should first observe what's going on, and then find a solution that suits your cat based on the specific situation.