When the stomach empties more slowly, food and acid stay in it longer and pressure can build. That can allow stomach contents to move up into the oesophagus, which is felt as heartburn or reflux.
Reflux that does not improve with everyday measures, or that comes with difficulty swallowing, vomiting, or chest pain, needs medical attention.