Do you know his history or breed mix? Some breeds are notorious land sharks as puppies, and a puppy who was separated from his litter too young - or was a singleton - does tend to have more issues with learning how to bite appropriately.
The general rule with biting is consistency. Some people say that yelping like a hurt puppy whenever you get bit works, and I'm sure it does with some dogs, but in my experience it's just as likely to amp a puppy up more. Instead, as RonE said, I end play and disengage with the puppy immediately - not looking at them, not talking to them, not touching them. I stand up and keep my arms crossed or held up until they calm a little, then go back to engaging. If it happens 2-3 times in a row, I walk away. If you have a persistent puppy who tries to continue biting at your feet or pant legs - or even jumping to try to nip your arms - you may have to set it up so you have a gate or door you can go through (or over) that the puppy can't follow you through. I love playpens for this, because you know the puppy is in a safe space so you can walk away from them with confidence. Ending play and engagement is going to make the biggest impact on a puppy that age, because that's what most puppies want the most from you.
In the meantime, make sure he has plenty of safe chews that he is allowed to bite and gnaw on, so that every time you see him getting worked up and thinking about biting you, you can grab one and encourage him to bite that, instead. Lots of praise and attention for chewing his toys instead of you! This teaches him an appropriate outlet for the behavior, rather than trying to get him to just stop doing something that's super natural for baby puppies. Chewing sessions also encourage calm and relaxation, so feeding a meal or two in a stuffed, frozen, fillable toy like a Kong Classic can be awesome.
And have patience! Even baby puppies need time to settle in to a new place, especially if they've been bounced around a lot when young, as many shelter dogs have, and they're going through a lot of developmental changes on top of it. Find calm activities to do together that don't necessarily involve petting and handling if that amps him up right now, like hanging out with him when he's chewing on a filled Kong, super easy training games, setting out kibble or treats in (very easy, at first) hiding spots for him to sniff and find, etc. You'll see him get more comfortable over the next couple weeks, and the bond will come. Puppies are HARD and a huge change, on top of requiring so much attention and mental energy from us, it's okay to be frazzled and feel a little disconnected from him right now.