Proton pump inhibitors and antacids definitely help with heartburn and they can be used. But I urge everyone to first see a doctor about their symptoms and requests some basic tests to find out the cause.
I suffered from heartburn for several years. My doctor did not run any tests for me. Instead he told me to use over-the-counter proton pump inhibitors. I used them for a long time, but my symptoms never completely resolved. I also developed vitamin and mineral deficiencies because proton pump inhibitors reduce their absorption.
I was so unsatisfied with my treatment that I switched to a different doctor. My new doctor is great and had me do a very simple breath test that only took five minutes. I had to blow into a small paper tester and then that paper was checked in the lab for stomach bacteria. My results came back positive, they found helicobacter pylori in my stomach.
I was treated with antibiotics and after the treatment, my heartburn symptoms completely disappeared. I'm not telling anyone to use antibiotics, I hope no one infers this result from my experience. All I'm saying is that the cause of the heartburn should be determined before someone starts using over-the-counter medications. When the problem can be resolved by treating the cause, why are we trying to mask the symptoms with drugs?