UTI while pregnant?

Has anyone had a UTI while pregnant? I’m nervous it will hurt the baby. I’ve been following the antibiotic schedule perfectly but just looking for someone who has gone through it also.