Welcome to just answer
What you are describing is most likely a Trigger finger...
It 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 cause of trigger finger is usually unknown
Speculation exists that repetitive forceful use of a digit leads to narrowing of the fibrous digital sheath in which it runs...
Injection of the tendon sheath with a corticosteroid is effective over weeks to months in more than half of patients.
When such steroid injections fail, a local surgery can be opted
I would suggest you consult an orthopaedic surgeon for further help in this regard