The entire world production of neodymium was on the order of 80k ton/yr the last I checked (though that was quite a few years ago).
The key difference being that once you extract it, you can first re-use it for decades, then recycle it. Whereas with fossil fuels you need to continually dig up more to replace the ones you burned and vented into the atmosphere then ship it to where it is used.
https://www.transportenvironment.org/discover/electric-car-b...
For sure, there is some pollution involved in extraction of the elements, but you do it once.
Contrast that with oil where you burn it and it’s done, you start over.
Electrification start with cars, then planes, then ships unless there is major breakthrough that reduce the cost of batteries.