You will need an upper GI endoscopy
to exclude causes like inflammatory bowel disease
. Of course, if the scopy results are normal, it is a good sign.
It is then possible you are irritable bowel syndrome
that can worsen after some foods.
The common foods implicated are wheat, soya so you would be able to know if that is the case.
Allergy is unlikely but blood tests such as specific IgE to food mix, nut mix (Phadia) will help exclude this.
Intolerance to wheat and soya or cow's milk does not come up of testing for specific IgE, i.e., they are negative.
Sodium chromoglycate or specific medications targeting IBS will help.