Most people misunderstand GERD, aka ‘heartburn’ or reflux.
It’s the contents of the stomach rising back up into the esophagus, generally due to a less than competent sphincter muscle at the gastroesophageal junction.
If you want to reduce the amount of stuff refluxing from the stomach up into the esophagus, reduce your caffeine, alcohol, and nicotine consumption, and review your prescription and other meds with your doctor, to see if any of them may be relaxing the valve. Muscle relaxers, calcium channel blockers, and benzodiazepines are big culprits in this. Also sleep with your head elevated, don’t lie down right after eating, and eat more, smaller meals. And avoid whatever foods seem to trigger symptoms for you. Oh, and lose some weight too, and wear looser clothing. All these approaches can reduce actual reflux.
If you want to reduce the burning from the acid content of the refluxed material, take antacids such as tums, maalox, mylanta, etc. Or take H2 blockers like cimetidine or ranitidine, to name only two. Or take proton pump inhibitors like omemprazole or pantoprazole, etc. These meds neutralize the acid, or reduce acid production in the stomach. That way, when the gastric contents reflux into the esophagus, it doesn’t burn so much. But reflux is still happening.
If you want to avoid the painful reflux from eating ‘spicy’ foods (i.e. those flavored with capsaicin-containing peppers or sauces), none of the acid reducers or blockers will help. That’s because this burn is not from acid, but from capsaicin. So you’ll need to either reduce or avoid the spicy foods, or take the measures designed to reduce actual reflux that I described above, or do a combination of those approaches.