Imagine for a moment that coal, oil, gas, metals, rare earth elements, lithium, etc etc were all simply an interchangeable concept of "bad mass". Meaning, we need the mass to do something, but the process of mining/extracting/producing it has bad side affects.
One way of doing things, the bad mass is produced and consumed on a constant basis. The gas in your tank is used exactly once.
The other way of doing things the bad mass is produced and re-used for roughly a decade, after which it can be recycled. The lithium in your EV battery will get used several thousand times in its first life, a few hundred more in a secondary application, and then recycled for who knows how many more uses.
So simply from a "consumed" vs. "re-used" basis the process of mining lithium (and cobalt etc) would have to be thousands and thousands of times worse than the process of drilling/extracting/refining oil just for them to break even.
It is good and important to recognize that simply replacing ICEs with EVs is closer to harm reduction than problem-solving, but it is a very very large harm reduction so statements like "electric cars aren't any better for the environment given all the mining" retard that harm reduction.