Mid back pain

Lane
I have a weird pain in my middle back. It's on the right side just under my ribs and it hurts when I move in certain ways. If I'm holding still is doesn't hurt. Anyone else experienced this/know what might be causing it?