When dogs are puppies it's very normal for them to bite in a playful manner and eventually the puppy will outgrow the biting as they get out of the puppy stage and age.
But sometimes puppy biting people can get out of hand and you need to stop it.
What I did when I had a puppy that was biting is to get a spray bottle and put water into the spray bottle and whenever the puppy would start to bite me or someone I would first tell it to stop and that was not nice.
Sometimes the puppy would stop biting when told to stop but if not then I would get the spray bottle and squirt the puppy in the face which caused them to stop biting.
The water is safe and not cruel to them and eventually they'll learn to stop biting you or they'll get sprayed with the water which they mostly hate.