burning whilst having sex

for the past few times, my vagina has been burning whilst my boyfriend and I have sex. it's not straight away,but it hurts so much we have to stop. not sure if this is because i had a yeast infection (or what i thought was),but this was a few weeks ago. not really sure what to do lol