Infection and stillbirth

Rosa
I was reading that some infection may cause still birth or miscarriages am so worried cuz my doctor told me a had an infection that can cause premature labor if I treat it or I don't it's still can cause it. has anyone been told this or gone trough this and have had healthy babies or not!!