Have you heard of the FODMAP diet? It can really help with IBS. You start by eliminating all foods with FODMAPS[1] for six weeks and then gradually reintroduce foods from each of the FODMAP categories. It’s recommended to have a dietician/nutritionist help with the temporary diet. It was pioneered by Monash University. [ https://www.monashfodmap.com ]
[1] the FODMAP acronym: Fermenatble Oligo-,Di-,Monosaccharides And Polyols