The very first cars had electric engines, that drove the front wheels, with steam/petrol to drive the rear……but they gave up on the electric side as the Battery could not be made portable/chargeable……it is still the same problem today, some 130 years later, as Ororeef says.
U still can’t beat gasoline / cubic inch, for energy.