Hello
I share your concern, I had gone through your question diligently and I will try to help you out in best possible way
Such a swelling on
frenulum can be caused by infection , Sexually transmitted infection and can be allergic as well
If you can upload me a photograph and answer my these questions I will be able to help you better
Your age and relevant medical history if any like
diabetes or
liver disease?
Have you ever had similar problem in past
any recent exposure to unprotected sex?
since I can't physically examine which gives more clue to diagnose you more accurately So,In my opinion you should see your doctor for physical check up and investigation to rule out infective condition
Meanwhile you can apply antibacterial or antiseptic ointment like mupirocin
Maintain good hygiene
you can take
Ibuprofen for pain.
Hope this answers your question, Please feel free to ask for more clarification, I will be happy to help you
Best wishes
Thanks and regards