When you build large hydroelectric plants, you cut down millions of trees. These trees convert CO2 into oxygen. So now you have more CO2 in your atmosphere.

It is the same as generating CO2 through fossil fuels. Zero sum game.