I have a sharp pain in my stomach right under my ribs?

Guessing? If it is on the right side and even in the middle, you could be experiencing gallbladder disease/stones. There could be gastritis or an ulcer. It could be a presentation of multiple other GI and non-gi issues. Sounds as though you need to be see and examined and perhaps have some testing done. Gallbladder disease would be at the top of my list based on your short complaint.