Wow, that's an answer that I could write a book about. I'll try and condense it to a few sentences without loosing all the real meaning.
Firstly, cars are 90 - 95% energy efficient, compared to cars which are around 30% efficient. If we burn that equivalent fossil fuel in central power stations, that efficiency rises to around 65%.
So just burning the same fuel centrally to power the cars is more efficient.
However that is not the general scenario. Firstly, many EV drivers get solar panels and home batteries and so generally contribute to the grid. Also as vehicle to grid technology gets adopted by more and more EVs, the grid becomes far better balanced. Think of the grid evolving into a peer to peer grid rather than the historic centralised grid (i.e. think analogous to Bitcoin decentralisation).
This is already way further developed than you think. Also new homes are being built with 3 phase supplies, this means they can draw current much more efficiently than single phase homes, but they are also able to supply current to the grid at much higher rates when required. This is either from solar arrays or from your connected car donating small amounts of electricity at peak times and being paid for it.
As for trucks buses and trains, trains are already electric and increasing in number. But as for trucks and buses I personally don't believe BEV (Battery Electric Vehicle) technology is best suited to those. Same as ferries and other large vehicles. I believe we do need to use fuel cells (hydrogen) for these large vehicles, but even if we don't then we are still either generating more electricity than required or burning fossil fuels centrally with much more efficiency.
The grid has been evolving for years, it doesn't make the media, but it is totally different and unrecognisable to 10 years ago.
That is a very short answer giving some small points, but the whole topic is enormous and fascinating if you wish to DYOR.