Even though each one produces less pollution, taken all together, they produce more. Also, factories and homes have stopped burning coal and, in many places, even wood, so car pollution is even more noticeable. Attitudes have changed, too. Progress and growth used to be so important that the environment was not well protected. Now, there are new cars that have both electric and gas motors, so that the polluting gas motor runs very little.
Some cars are completely electric and produce no air pollution at all.
Still, the electricity is stored in batteries in the cars, and when the batteries wear out, they can pollute the garbage dumps. Also, the electricity to run the cars has to come from somewhere. Unless you generate it with solar cells or a hydroelectric dam, there may be pollution from a generating plant that burns oil to provide the electricity to charge your electric car. Every technology has some costs and some benefits. A person who understands and evaluates technology can weigh the costs and benefits to decide whether a technology would be good in a certain situation.