Why do I keep having bacterial infections?

Recently I keep getting bacterial infections, a few weeks back I had vaginal discharge and I got tested from my doctor and she said I had Bacterial Vaginosis... So I took anti biotics for it and the problem went away. Now my partner said to me he thinks he has thrush, he just came off a strong course of penicillin. I had some pain in my groin area for a few days and now I've woken up and I definitely have thrush 😫. My partner said I could be getting it because I use shower gel to wash my vagina but I have used bubble bath for many years and never had a problem until now. Could it be that he was using penicillin and he has passed me truth? He had symptoms before me. Thanks