According to Consumer Reports, electric cars are now cheaper on a Total Cost of Ownership basis than gas cars.
Your mileage may vary depending on what you select as a comparable and some of your assumptions, but you save a lot of money on fuel and maintenance and need to factor that in. The resale value of your vehicle is also a huge factor.
https://arstechnica.com/cars/2020/10/owning-an-electric-car-...