Batteries have only recently-ish gotten energy dense and cheap enough for electric cars to be competitive, completely different solutions are needed for long distance shipping by sea or air.
It's the same situation across many other sectors like agriculture, construction and waste management. Lots of things causing emissions that's not electricity generation.