Frequent gas is common on a vegetarian diet, often because gut bacteria ferment carbohydrates and fibers that are not fully absorbed. Beans, lentils, chickpeas, onions, garlic, cabbage, cauliflower, wheat, some fruits, dairy, and sugar alcohols can all contribute. The resulting gas can cause bloating and flatulence.
NIDDK explains the dietary causes.
If symptoms persist, a short, structured low-FODMAP trial with a registered dietitian can be useful, followed by gradual food reintroduction. It should not be a permanent restrictive diet, especially for a vegetarian, because it can reduce protein and nutrient variety. The
American College of Gastroenterology overview explains how FODMAP carbohydrates can produce gas and bloating.
See a clinician promptly if you have weight loss, blood or black stool, persistent vomiting, fever, anemia, severe or worsening abdominal pain, new symptoms that wake you at night, persistent diarrhea, or a strong family history of celiac disease, inflammatory bowel disease, or colorectal cancer. Otherwise, discuss testing for lactose intolerance, celiac disease, constipation, or IBS if this remains frequent despite dietary adjustments.
Recent reviews support dietary approaches for IBS-related symptoms, but do not prove that IBS is the cause in your case: PMIDs
39862384 and
39407084.