There are generally three reasons why a cat might bite:
1. Newborn kittens like to explore the unknown world around them by sniffing and biting.
2. Cats may become more prone to biting people and things during teething and teething periods.
3. When the cat is frightened or attacked. 
Cat bite prevention measures:
1. Buy some toys for your cat, such as a scratching rug set, a hanging ball, a moving toy mouse, etc. Let your cat play with the toys until it gets tired, and it will naturally lose the energy to scratch you.
2. Pretending to cry in pain can also be effective. When your cat scratches you, cry out in pain, then ignore it and don't play with it. Most cats don't like hurting their owners, so they'll notice your displeasure and become more careful not to bite. Alternatively, simply ignore it completely, letting the cat realize it's been playing too wildly and that's why you're unhappy.
3. Use water spraying. When the cat tries to pounce or bite you, use a water gun or sprayer to spray the cat with water. After a few times, the cat will stop trying to pounce or bite you.