There is significant wastage in converting heat or mechanical energy into electric energy and then into mechanical energy (again).
Nearly three times as much energy is required.
Most electric energy is still produced by oil, coal or gas.
Consequently, electric cars pollute more than petrol or diesel cars. They just pollute somewhere else.