Hi and welcome to the forum! I am glad that I can help you.
You want to know the cause of the symptoms that you described.
Gastritis is inflammation of the gastric lining. This may appear due to damage of the mucus protective layer or hyperproduction of hydrocholric acid. Underlying infection with Helicobacter pylori may cause the appearance of the symptoms of gastritis. Gastric ulcers are erosions of the gastric lining due to the effect of the hydrochloric acid on the gastric lining. The erosions may become deep and may cause bleeding. Both of the conditions are diagnosed with serological tests (to exclude possible infection with H.pylori), gastroscopy, measuring of the Ph in the stomach, etc. If there is not any confirmed statement that would suggest gastritis or gastric ulcers, the cause of the symptoms is considered due to a psychological cause.
According to the data that you described, you may or may not experience any of the medical conditions listed above. You may consider having the tests listed above to exclude these medical conditions.
Please keep in mind that I provide medical information only. I am not able to diagnose medical conditions online. Please contact your doctor for further advice and information about diagnosis and treatment options.