vag infections ): i need help/advice

hi, im 19F, and so around april 3rd i went to my ob and found out i had a yeast infection(first time ever).. and did the medicine and everything right and it went away but then around may 6th i started noticing only 3 symptoms(odor, itchiness & green pee), and so i had my appointment today and she said that i have BV /: and prescribed me a 14 day pill treatment. can anyone give me some advice for this not to happen again /: it sucks sm and i really don’t want to get another infection and i dont know what to do to get them to not come back.. so any help would be appreciated and helpful <3 thank u