I guess u stressed your lateral ribs area with some unusual bad posture, for eg. Leaning towards Ur ribs area for a prolonged duration, or sitting for longer duration with Ur side part of the body over any hard objects or an arm rest. Probably it could have disturbed Ur underlying tissues. It's good to have cold packs for now to relieve Ur pain. Of it persists for longer, then have an appointment with a physiotherapist.
Next Steps
maintaining proper posture.
Health Tips
frequent changing of positions.