Welcome to HCM.
I am suspecting a ganglion
which is nothing but swelling of tendon sheath or synovial sheath. These swellings usually occur nearby joints and are painless. They are common in patients suffering from rheumatoid arthritis
. They become painful when inflamed. They usually resolve by themselves. They can increase in size and compress on the nearby nerves causing neurological symptoms.
The fluid in them can be aspirated or they can be surgically removed. I suggest over the counter painkillers for the pain. I also suggest an orthopedic opinion to decide on surgical removal or aspiration. Thanks.