The most likely cause for the same maybe a ganglion cyst
These are benign sacs of gelatinous fluid that form off of a joint or tendon sheath. They are seen frequently in the wrist but can also occur around finger joints. They form when a portion of the joint capsule or tendon sheath starts ballooning out and becomes filled with the fluid that lubricates the joint or tendon.
Another possibility is giant cell tumor of tendon sheath. Unlike the fluid-filled ganglion cyst, these tumors are solid masses. They can occur anywhere there is a nearby tendon sheath. They are benign, slow-growing masses that spread through the soft tissue underneath the skin, the good news is that these are benign and not cancerous
Other types of cysts, fibroma, contractures etc. can all cause the symptoms that you are describing.
The good news is that most of these conditions are not very serious and cancer is extremely rare in this situation
You would however need to be evaluated by an orthopedician/ hand surgeon to confirm the exact diagnosis so that appropriate treatment can be started,
Please remember to press the GREEN accept button so that the transaction is completed
Do remember to get back for any clarification