There's other negative externalities from car usage apart from the energy usage, like tire and brake dust, congestion, accidents, and road wear. And using up limited space in cities for parking. Etc. etc.
Even if you only wanted to tax energy usage, that clearly correlated with the amount of fuel or electricity used. Taxing liquid fuel is common and a sensible choice, however you can't slap on a big tax on electricity in general since if anything we want to encourage electricity use in favor of fossil fuels (e.g. heat pumps powered by zero-carbon electricity instead of gas heating, or indeed EV's instead of ICE vehicles). And arguably for electricity, it would be better by slapping a CO2 tax on the producers (or some roughly equivalent scheme like cap-and-trade) rather than taxing electricity generally.
And of course, if you want to tax by miles driven, that then gets into all kinds of problems how to track that in a way that doesn't enroach on people's privacy. Say, checking the odometer during yearly inspections?
So where does that leave taxing EV's? Maybe a flat yearly fee based on the weight isn't that terrible, and it's at least cheap to administer and doesn't leave much space for cheating. Although that is of course very unfair to those who live out in the boonies where parking space is not at a premium and drive very little.
As for the other things, such as congestion, I believe it when I see proof that there is a big difference between cars. Even if there is, the priority right now should be energy efficiency, because reducing CO2 emissions is fairly urgent.
Which implies that a vehicle tax should then be primarily concerned with non energy use types of externalities. And maybe generally funding road construction, and so on. Probably a lot of that is more accurate if the tax is a function of distance driven than a fixed cost, true, assuming you can reliably get that information in a privacy compatible way.
No it isn't. Even the most simple look into EV database would have shown that this is flat out wrong. There are heavy and big vehicles in there using very little energy and small ones using a lot.
So what should be taxed is the actual efficiency - either per individual vehicle which would also incentivise reasonable driving (could be easily done by either submitting two numbers, similar to what is already submitted to insurance) - or by using the test ratings which is a good approximation.