It's important to take all of those things into account, and moreover to consider that we may have differing values and may need to compromise; but, in order to do that, we first need to be able to arrive at a correct understanding of the basic facts of the situation. For example, whether there is or is not enough land for solar power to replace
current energy production from coal, other fossil fuels, and nuclear power (there is, with almost three orders of magnitude to spare); whether solar panels do or do not contain rare earth elements (they do not and never have); which mines produce products needed for solar-panel manufacture or nuclear power, and in what quantities, producing what quantity of environmental damage; how much lithium is available for batteries; and so on.
Lacking a correct understanding of even the most basic facts of the situation, we cannot hope to reason about the consequences of possible courses of action.
As you can see above and elsethread, I've spent some time and effort to try to figure out some of the basic facts of the situation. I'm certainly no expert — for example, I only found out this year that solar panels include screen-printed silver paste, which accounts for on the order of 10% of the cost of photovoltaic modules and on the order of 10% of global silver production — and so I'd appreciate some help.