Tylenol!!

Tt
I get really bad headache can I take Tylenol while pregnant would it affect the baby ?