The best solution is 0 cars anywhere.
A more realistic solution, is to replace planet-murdering cars with planet-kicking cars.
The math that I have seen on when an EV becomes better for the planet compared to an ICE is kinda all over the place, mostly due to how the power is generated.
Where I live, with a high amount of coal, buying a used ICE vehicle makes more sense than buying a new EV. If we drove more than just our weekly grocery trip, it might make more sense.