Thank you for your question.
I am Dr Saha, I shall try my best to help you.
The pain on the right upper side of the abdomen under the rib cage can be from a few causes.
It can come from gallbladder & liver.
Gall stone, infection, hepatitis can be there.
There can be muscular pain when it aggravates with movement or deep respiration.
Sometimes pleural inflammation pain can be referred here which can increase in deep respiration.
Peptic ulcer pain, gastritis pain can also be felt on the right side.
I would advise to have an examination by doctor.
You can need investigations like chest x-ray, ultrasonography, liver enzyme study or other blood tests.
You can try nexium or zantac, meanwhile.
Please avoid alcohol, spicy food, caffeine & smoking till you see doctor.
I hope this information helps.
If there’s anything else I can do, please let me know.
If you are satisfied, please rate my answer as good or excellent.