I have this. It could be gastritis. Ask your doctor bc it can be treated with Omeprazole. Fasting and drinking on an empty stomach can worsen it. Also lots of caffeine or spicy food on an empty stomach. Also stress. Tums help me some.
Could be gas inducing foods? Some vegetables like asparagus, broccoli, Brussels sprouts, cabbage etc though healthy can induce gas and cause pain. My bloating reduced a lot when I took care of this by reducing the quantity.