Hello dear
I understand your concern
Pain under ribcage on right side could be due to
costochondritis, inflammation and stone in
gall bladder,
gastritis, GERD, liver inflammation, stone and infection in kidney.
I would suggest to consult internal medicine specialist and undergo clinical examination, blood tests like CBC, ESR, LFT, KFT, USG scan.
Specific treatment depend on cause and test result.
Meanwhile take tablet Dan MR, tablet
ranitidine, apply warm pad application, avoid exertion.
Hope this may help you
Contact further if follow up needed
Best regards
Dr. Sagar