How to stop acid in your stomach from causing pain?

Trying an antacid. A histamine receptor blocker or proton pump inhibitor which you can obtain by seeing a doctor who will make sure you don't have an ulcer or something concerning.