Hello and welcome to e health forum.
It seems that you might be having a trigger finger.
Trigger finger is a common disorder of later adulthood characterized by catching, snapping or locking of the involved finger flexor tendon, associated with dysfunction and pain.
The most probable cause would be due to overuse, repetitive stresses, workplace vibration, and repetitive forceful use of a digit which leads to inflammation of the fibrous digital sheath.
Treatment of such conditions is with anti inflammatory medications and if needed steroid injections within the involved joints.
You may consult with your doctor or a orthopedician who can examine you and provide proper treatment.