Pelvic exam

I’m 23+3 today and I got an exam because I was worried about BV. I then read that an exam can sometimes cause preterm labor and now I’m freaking out... my cervix was long and closed when they checked..