Uti and pregnant?

I’m very worried that something can happen to the baby bc I’m still VERY early on.. doctor prescribed me some macrobid.. I researched and they said it’s completely safe to take and is given to pregnant women with uti’s. I’m worried it will still affect the baby. I’m a first time mom so it’s nerve wrecking. I really don’t want to go through a miscarriage😭 anyone took this in the beginning and was fine?