You are most likely having Trigger finger.
This occurs when the tendons moving the fingers get inflammed leading to contraction of the fingr and locking. Link
You have to see an
Orthopaedician for this. Please look up the link and discuss this with an Orthopaedician.
I hope this answer was helpful. If you need more information, feel free to ask. For accepting this answer, please click on the green 'accept' button below. Feedback/Bonus will be warmly appreciated.