Sorry to hear you are having so much discomfort! I would recommend having your doctor
check this out, especially if the pain persists or worsens, just to make sure there is nothing serious going on.
Given the way you describe the pain (as a pinching, cramping pain) I think the most likely cause is that you have strained one of the muscles, called the intercostal muscles, that lie between the ribs. This is quite easy to do, especially with heavy lifting or vigorous exercise. The pain is typically worse when you change positions or when you take a deep breath. Another, similar, cause of pain would be costochondritis, which is an inflammation of the cartilage connecting the ribs to the sternum. Both of these conditions, if diagnosed by your physician, can be treated generally with just standard anti inflammatory medications and some rest.
There are a few serious conditions which can cause this kind of pain, including blood clots or infections in the lungs, trouble with the heart, or inflammation in the gall bladder or pancreas. Your primary care doctor
can perform additional testing and bloodwork if they are concerned about any of these possibilities after performing a physical examination. Please see your doctor soon.