Simply saying EVs are so much better for the environment that they don't need to pay for roads at all seems a little short sighted.
Taxing tires would work. Also, mileage is already recorded during vehicle inspections. That could be used to calculate tax but would be more open to fraud.
Depend where you get your electricity from. Also most of car pollution comes from tires and brake dust, which EV create more of given their weight and torque
https://www.theguardian.com/environment/2022/jun/03/car-tyre...
See, we can play this silly game all day long or just all chip in.
Also, having lived in a city I can tell you that brake dust and tire wear is also a big part of car pollution.
Unless you want 100% toll roads, we need to come up with fair-ish way to tax EV road use.