Eat many small meals throughout the day.
Avoid sour/acidic food and fruits and drinks.
Avoid spicy food.
Chew your food properly before swallowing.
Do not eat food that are hard to digest (eg glass noodle/glutinous rice etc)
Do not drink cold water.
Do not eat cold food (eg Japanese cold noodle/salad etc)
Avoid oily and deep fried food.
Avoid preserved food.
When the pain comes, do not lie down flat. Lie down with the upper part of your body propped up at least 30 degree.
You may also ask your GP or gynae for Gaviscon advance (get advance version).
I’m someone who suffers from severe gastric issue and ulcers way before pregnancy. The above advice from my gastroenterologist really works but you need to be very determined.
Hope it helps.