But they aren’t, not even close. Oil is massively subisidised by the military before the environmental costs. Brake particulates and tyres don’t cover the cost of microplastics and lung damage, heavy cars don’t pay anywhere near the damage they cause to the roads and bridges etc.
Due to this you can argue pretty much whatever you want by ignoring certain costs depending what you want to come out with.
My petrol car is 20 years old, it’s done 70,000 miles, it weighs about 1,000kg and burns through 300 litres of unleaded each year to do the 3,000 miles I do in it.
I suspect scrapping and replacing this with even a small electric car would not be globally environmentally worthwhile. There may be improvements to local air quality assuming regenerative breaking etc, that may be offset by increased tyre and road wear though, even ignoring the impact of the co2 to generate the 80kWh a year it would require.