antibiotics and yeast infections

I was prescribed Metronidazole for 7 days by my Dr for an early vaginal bacteria infection. Well I've looked these meds up and they are also prescribed for yeast infections, atleast that's what it says.....and yet it caused me to get one 😣. Has this ever happened to anyone else who may have taken these same meds? And yes I know it's an antibiotic and they usually cause yeast infections.....but I read these meds also are for yeast infections. Any ideas? Should I just go get an over the counter Monistat or something? Thanks ladies!!