Welcome to YT! "Hold it" comes with age. What you can do is be very strict, or consistent about where pottying is acceptable. Piddle pads and outside is ok and equals treats and praise. The car, your friends home, etc equals a stern no. (No yelling just be firm) Do expect accidents with a puppy. Do remember it also gets better. Also, while your pup is young set them up for pottying success. The more chances you give your pup to get it right, the more chances they have to please you. For example, set a schedule and stick to it. Right when you get up, take your puppy to the pad and give the potty command. Praise and treat when puppy does well. Feed puppy and then give her a chance to potty again. If she doesn't confine her to her crate/pen for 10-20 mins and try again. Right before and right after playtime is another good opportunity for potty. Activity always seems to make them want to go.
and of course right before bed.
I hope this is helpful!