Tests and tests,no one knows, i gave up on diagnosing, its none of the usual conditions. It gets better if i eat exclusively rice and water for a week but i cant be bothered to do that.
Try researching SIBO
I had gut issues and the tests didn’t show anything, I went primal (like paleo but with dairy and using a blender to make shakes) and I’m fine now.
I’d second the other comments and suggest you research SIBO, gluten intolerance, and fringe diets such as paleo; and do an elimination diet.