Its frustrating I know. Could be a number of things. IBS is a patience tester and trial and error.
For me, Aside from eliminating a lot of foods I realized what is causing mine is the infection inside which was only found through a specific stool test from my Naturapathy doctor. GI doc didnt wanna do it. Im on natrual antibiotcs. Still get flare ups but not as often
Take Immodium to stop or control it but its not the cure unfortunately.