Gas can be controlled by using otc drugs such as beano or gas-ex as well as probiotics.
Trial and error of different otc medications can help you find what works for you. Gas is from food being digested by bacteria
in your gut. The best way to prevent gas is to keep a journal of what foods you eat and when you get gas. This can help you minimize the foods that tend to cause you to have gas.
Answer assisted by Garrett Caldwell, Medical Student