BV at 30 weeks

I was recently diagnosed with bacterial vaginosis. I know you can get it from having sex, but more frequent if you have multiple sex partners. I have been with my husband for 3 years..I am on flagyl currently. Is this common? Should I be concerned? How do I prevent it? Or do I go to worse case scenario and think my husband is cheating? We have a trusting relationship. I just don’t know how I got this...