This is what I found :
If you want to make a comparison with combustion engines, you have to include the CO2 that comes with producing electricity. At the same time, not only is CO2 released when petrol or diesel is burned in an engine block, but the production of these fuels is also anything but CO2 neutral. So this also has to be taken into account. The total emissions when you add these factors together is also called the well-to-wheel emissions (WTW). Research by TNO (see the PDF download at the bottom of this TNO webpage) shows that the WTW emissions of an electric car are three to four times lower than those of a petrol or diesel car.
Variable Tipping Point
The number of kilometers after which this tipping point occurs depends on many variables. TNO calculated that for a mid-size car, this is approximately 39,000 kilometers. Since the average lifespan of a car is around 220,000 kilometers, an electric car ultimately has 35 to 55 percent lower CO2 emissions than a comparable gasoline car.
Incidentally, a battery pack will most likely reach 220,000 km. This is subject to degradation (and therefore a steadily decreasing range), but it certainly won't always be necessary to replace a battery pack halfway through its lifespan, as is often assumed.
(published on https://www.anwb.nl/auto/elektrisch-rijden/elektrische-autos/hoe-duurzaam-zijn-elektrische-autos source research institute in the Netherlands)
I couldn’t find anything about solar energy which is used by many EV car owners.