Pregnant and given Percocet

So I’m currently 16 weeks pregnant. I’m at the ER due to a head cold I can’t get rid of and the OB doctor gave me a Percocet for the headache and told me to Take Tylenol cold and sinus. I’m kind of scared I feel like vomiting it up. I don’t want to feed this crap to my child. Idk what it can cause !