Building nuclear power plants is something we should be doing, however simply constructing enough nuclear power plants to replace all fossil fuel plants would create an insane amount of carbon dioxide before they even go online.
Creating cement/concrete is one of the primary sources of CO2 emissions - producing a cubic yard of concrete (about 3900 lbs) is responsible for emitting about 400 lbs of CO2. Of course then you have to factor in all of the CO2 produced for manufacturing the structural steel, the fossil fuels that go into all the plastics and wiring, etc.
What’s already been released is enough to have already changed the climate and will continue warming the planet as long as it’s in the atmosphere.
Planting trees helps remove CO2 from the atmosphere that we’ve already released.
We should be both planting trees (to reverse past emissions) and changing our energy sources (to minimize future emissions).