Be kind, there’s no need to hurt a puppy. It’s still a baby and teething, and biting is part of play for a dog.
I used to wear a welding glove which the puppies associated with play, and they were allowed to nip at that, but not at a bare hand. This was for Wolfhounds and Great Danes. When they got bigger, if they bit or nipped my hand I would push it further down their throat and say “No!” – they really don’t like that and stop.
Teach it the meaning of “No!”. Rolling on to back as mentioned earlier and hold down for a few seconds is also something they understand.
Dogs are social animals, they don’t want to hurt their pack members, but they have to have their place in the pack reinforced.