Maybe.
For years people prone to ulcers were told they have to handle stress better and drink milk, and then some scientists figured out most ulcer suffers have an infection causing the ulcer.
Eat mild foods like oatmeal, non acidic fruits, cooked vegetables, plenty of water and avoid sugar and see if you feel better.
Constipation a can cause pain up in the upper digestive track, so if you have been constipated consider that as a possibility.
Is your pain shortly after eating mostly towards the left behind the breast? That’s like stomach. Or, extremely painful towards the right? That’s likely gall bladder. Or, is it in the center of your chest moving up towards your throat and jaw? Acid reflux.
If you see signs of anemia, tired all the time, tongue, lips, and conjunctiva look pale, or your tongue hurts, see a doctor.
Not a bad idea to see a doctor if it doesn’t go away with antacids or change of diet. If it is intensely painful and on the right side, that should be seen by a doctor so you can get an ultrasound.
Also, if you are short of breath or very nauseas that can be an emergency. Women and some men feel nauseas and have pain in their chest and jaw when they have heart attacks. It doesn’t sound like the case, but everyone should know those symptoms.