Modern agriculture, both animal and non-animal versions, are bad for the environment. Artificial fertilizers, replacing forests with farm land, and drainage of wet lands are all heavily contributing to emissions and water pollution, destroying local ecosystems as well as warming the planet. Artificial fertilizers is particular bad since its production uses fossil fuels, has large amount of accidental green house emissions, and causes eutrofiering to the point of areas like the baltic sea becoming basically dead from loss of oxygen. Runoff from farms are also now the primary cause of ecosystem collapse in fresh water lakes.
The most impactful elements of modern agriculture are entirely animal-based. Full-stop.
You in fact rightfully but incompletely recognize : artificial fertilizers (for giant mono-crop fields of soybeans to feed to cows and pigs [0]), replacing forests (to clear room for soybean fields and pasture for cows and pigs [1][2]), and runoff of these fertilizers and manure into waterways. The parent comment is right - if we want to fix these problems, we must stop killing and eating animals at such an industrial and horrendous scale.
0. https://www.ucs.org/about/news/extent-emissions-created-mass...
1. https://ourworldindata.org/drivers-of-deforestation
2. https://gfw.global/39qbPdC
3. https://ourworldindata.org/global-land-for-agriculture