Even with a pure coal fired grid, an EV only produces as much carbon as an ICEV getting 40mpg. Most grids are much cleaner and there are only a couple of such fully coal powered grids in the US. In the last few years, the percent of coal use in the US electric grid has fallen from about 40% to 18% and it is predicted to continue falling.
Take a look at this map showing the carbon output of an EV in various districts measured in equivalent MPG.
https://blog.ucsusa.org/wp-content/uploads/2021/06/Microsoft...