Welcome to HCM.
It seems from your history that you might hae had forceful penetration or vigorous sex which actually caused injury
to the fore skin. Now there could be two possibilities I can make out- the one is Paraphimosis
and the other is simple injury and inflammation.
Now to rule out the two is your foreskin easily retractable back or it seems to be stucked when you retract your skin. If you are able to retract your skin then nothing a problem it will be alright in few days nothing to be applied or at the most can take pain killer to reduce the swelling bit early. But if the foreskin is not retractable then immediately meet a surgeon who will advice you properly. In between avoid contact and be gentle next time.
With best health wishes,
Dr Sanjay K Kanodia