Sexplantations

So I’ve recently just started having a lot of pain either during or after sex. It started at the end when I was getting off my birth control and now it’s happening more and more often. I have had a yeast infection a few times but the last few times it’s different. It’s not unbearable. It’s just when I go to the bathroom after sex it burns and sends a pain up into my pelvic area. I’m not sure why it keeps happing. It also varies. I could get it now and let’s say wait a few days to weeks to have sex again and be fine. Then wait a few more days and go again. But then it’s back. Not sure what’s causing it.