The best thing for the planet is to keep using old vehicles for a long time, even if they are more polluting. More damage is done to the planet during the manufacture of the vehicle than during its lifetime being used.
Which is why the solution - for everyone to but a new electric car - is the worst solution. It’s only good for the car companies.
How long is this true, though? Sure, it’s usually better to buy a slightly used vehicle. But buying a much older vehicle is going to have its own environmental costs. Maintenance starts to have a larger impact as more and more parts fail. Efficiency goes down, sometimes dramatically. There’s also the broader impact of the decision to buy electric, which demonstrates to manufacturers that there is a viable market that they should be served. Ford, Mercedes, Volvo and Mercedes-Benz have already pledged to only sell zero emissions vehicles by 2035. I am sure part of their willingness to do so is because they see no future in ICE.