Hello and welcome to HCM.
Thank you for your query.
The following reasons could be causing your symptoms:
(infection of a hair follicle forming a cavity containing pus and dead tissue resulting in pain and swelling)
(that also has a bad odor)
-foreign body (presence of a foreign body that also results in ad odor)
Please consult an ENT (ear, nose, throat) specialist at the earliest, so the doctor can visualize and diagnose your condition.
I hope I have succeeded in providing the information you were looking for. Please feel free to write back to me for any further clarifications. I would gladly help you.