My mother always said, "Better out than in!"
Someone mentioned gut flora, aka microbiome, and it does thrive on fibre. If you get more fibre into your diet it might improve your windyness but, be warned, it could get worse before it gets better! Go gradually.
Have you had antibiotics lately? They play havoc with your microbiome. You can repair it with pre- and probiotics e.g. high fibre foods and fermented foods like sauer kraut, kefir, kimchi, Greek yogurt but make sure they aren't pasteurised. Better still, make your own! It's great fun.