Easy, just compare the amount of pollution required to make a battery and a solar panel with the amount of pollution required to extract and burn fossil fuels for the equivalent power output over the duration of the renewable’s working lifetime.
If it is so easy I am waiting.
We don’t need to even do the math ourselves. It’s already be done countless times and the results are always the same.
BEVs over their lifespan in the worst case scenario produce less than half as much CO2 emissions than a similar sized ICE vehicle.
https://www.epa.gov/greenvehicles/electric-vehicle-myths
https://climate.mit.edu/ask-mit/are-electric-vehicles-definitely-better-climate-gas-powered-cars
I’m surprised you struggled with this, with so many creditable sources available this was a really easy thing to look up.