Urinary tract infection

I’m 6 weeks pregnant and just found out I have a UTI can it harm my baby?