My wife enjoyed and _loved_ galic for 30+ years before her IBS kicked in. Garlic is extremely bad for IBS because bacteria gorge themselves and produce a ton of gas, which causes horrible intestinal pain.
A study [0] recommends garlic and onions as key foods to restore a healthy, balanced microbiome.
I have never heard anyone before you claim that garlic or onions will kill bacteria. Rather, they let a specific kind flourish.