I have persistent heartburn despite taking over-the-counter antacids. How can I fix it?
First, would make sure to establish care with your local GI doctor to ensure there isnt any long-term damage to the esophagus. Then, would try over the counter Pepcid Famotidine 40mg for a few weeks. If no improvement, you could trial a proton pump inhibitor like Omeprazole. The most helpful treatment for heartburn and acid reflux are lifestyle modifications such as: avoiding hot spicy and acidic foods, avoiding caffeine, avoiding added sugars, avoiding alcohol, eating smaller more frequent meals, not eating within 2 hours of going to bed, and elevating the head of your bed.
Over the counter antacids are not very potent, so you may need to try prescription proton pump inhibitors. This can be discussed with a primary care doctor or gastroenterologist.
You should consider seeing a GI doctor as soon as possible.