I'm sitting up and moved my lower back inward, and had a horrible sharp pain on both sides, like flank area. Now my upper rib hurts to. Miserable lol. Help?

Likely rib/spine. ...Pain from movement and subluxation, now w/spasm. Try stretching--forward to toes & hold, can gently pull upper body toward legs while bent over. Then try arching backwards slowly as far as you can go--often if have both arms crossed behind low back & lifting upward can get release/relief. If fails--head to urgent care for eval and meds.