Are clean technologies and renewable energies better for the environment than fossil fuels?

Instead of drilling for fossil fuels, we need to mine for minerals to manufacture “clean” technologies like solar panels and batteries.