You have developed a muscle spasm or muscle overstretched, you need to visit a Physiotherapist US and TENS will be good option for you.
Next Steps
You need to do rest, don't sleep on painful side, avoid any heavy lifting or carrying heavy object from painful hand.
Health Tips
Do icing for 5-10 mts at a time,
minimum twice a day.