There are good use cases for both technologies.
For smaller, lighter vehicles in warmer climates, lithium batteries make a lot of sense.
For heavy, long haul trucks that require minimal refueling, hydrogen fuel cell makes a lot of sense.
You need to build out the infrastructure for both.