Yeast infection

Samantha

So I just got a yeast infection. I did have sex with my boyfriend Saturday but I didn’t have it then. Is it possible to get it from sex? What are other ways I can get yeast infections?