Hydrogen doesn't compress beyond a few atmospheres meaning that a car with a hydrogen tank is just a bomb with wheels.
A better use of free hydrogen would be in a fuel cell car where it is used to make electricity. Better still a conventional EV with a good battery.
A staggering 66% of the energy in fossil fuels burned to make electricity goes up the chimney. Another 12 percent gets dissipate in the transmission lines.
That leaves 22 percent available to power a consumer device whether that's running a TV or charging a car.
Wind and solar have better numbers simply because they don't have chimneys (LOL!). Wind and solar will give way to geothermal because the numbers are best.
Piston engines give off a lot of energy as heat and that's the case with gasoline, diesel or hydrogen. All good reasons to retire the piston concept.
Electric motors are a leap ahead of engines.
We don't need a perfect solution to the transportation problem. First we need to be able to get around using the least energy possible. That means using electricity to power our cars.
Second, we need this solution temporarily, I figure for a century. During that time we should be able to refactor cities to be greener and for society to require less moving around by the individual. More things will come to us and our descendants. Think Amazon.
Lastly during that century, expect the earth's population to be cut in half. It's already starting. Many, many people, especially in dictatorships, are deciding it's not worth it to bring kids into the world. Both China and Russia have begun the population decline.
Transportation isn't even our immediate need so why obsess over pistons and the roar of engines when the real need is cheap, efficient sea water desalination?