GI problems. Farting too much is definitely due to poor digestion of something. The top few things are dairy products and gluten. Try an elimination diet without these for one month and see what happens. Introduce only one back to see how you do. Add a probiotic to help improve your digestive ability.
Mainly gut bacteria. Some of your gas is a pass through from air you capture as you swallow food. However, most is created by bacteria as they feed on food particles you do not digest completely.Common agents include the sugar of milk products (lactose), the sugar in some vegies (fucose) and others. Keeping a food diary & selectively avoiding some foods will help. Changing your gut germs by taking probiotics may help.