That goes for anything hydrogen and wheels pretty much.
It's actually pretty simple to figure out. Making hydrogen takes energy. You lose some of the energy making the hydrogen. This is not a fixable problem. At least not unless you break the laws of thermodynamics.
When you have created hydrogen, you lose more energy compressing the energy. Then you have to transport it to wherever it's going to be pumped into the vehicle ... both of which take more energy. Then it goes into a fuel cell, which loses more energy. All these losses multiply. And if you know your maths, you know that multiplying numbers smaller than 1 means the result gets smaller and smaller. These losses are significant.
And we're comparing it with putting the energy into a battery directly. It has inherently better round trip energy. Even if hydrolyzers, and the infrastructure to store, compress, and transport hydrogen were free (which they are not), using hydrogen would still be more expensive than that. Because it wastes more of the energy that goes in. So, in addition to the energy losses, you also need to deal with infrastructure cost. On top of regular energy infrastructure.
Anyway, that's all theory. For practice, just look at market price of hydrogen. Most of that stuff is of the dirty grey hydrogen variety creating that wastes a lot of methane. So much, that it would be cleaner to just use the hydrogen in a combustion engine in the bus and you'd have less CO2 emissions. Expending more methane to make hydrogen to have less emissions makes no logical sense.
If you are using grey hydrogen, it is more expensive per mile than methane. Nothing can change that. If you are using green hydrogen, it is more expensive per mile than battery electric. Nothing can change that either. That's just physics and simple economics. Yes there are some innovations in this space happening that reduce the gap a little. But it's never going to be enough.
Right now it's not even close. Unless somebody is subsidizing the hydrogen fuel, you'd be paying way more per mile than with diesel. And not just a little bit. And a common reason to switch from diesel to BEV is that it actually costs way less per mile than diesel. So, instead of saving money, you are spending more money.
Subsidies are hiding the true cost of hydrogen. That's the only reason there are some vehicles on the road. As soon as the subsidies dry up, hydrogen transport use cases evaporate. There are of course plenty of other use cases where hydrogen is needed that make much more economical sense. Using scarce and expensive hydrogen for transport is a poor use of resources. The utopian world where we have vast amounts of hydrogen surpluses does not exist.
The argument for hydrogen has to do with energy density. There are certain use cases where batteries are just too heavy, but hydrogen, with its higher energy density, is not. Maybe that will change in the future, but as it stands now, energy density is a significant barrier to adoption of battery/electric in certain areas. The cost of energy doesn't matter if it can't be used due to batteries being too heavy.
It's possible to imagine a future where both fuel sources have found their place, depending on context. Doesn't have to be an either/or.
The fallacy with that argument is that hydrogen's volumetric energy density is very low.
In liquid form, methane has about 2.7x more energy by volume than hydrogen. Diesel has 4.2x more energy. Keeping and transporting hydrogen in liquid form takes a lot of energy and requires constantly boiling it off to keep it liquid. In practice, most hydrogen is transported in compressed gas form (700 bars). In that form, you need about 11 hydrogen truckloads to a single diesel truckload.
So, it takes up a lot of space. This makes it very impractical for transport use cases. Unless you convert it to something that maybe contains hydrogen but also other atoms. Like carbon (carbohydrates) or nitrogen (e.g. ammonia). Converting it to those forms takes more energy. And those multiply. And doing the chemical conversion back to energy in a combustion engine has the same problem as all combustion engines: it loses most of the energy as heat. Fuel cells might improve on that; but they'd still be losing energy.
This is why battery electric trucks easily match the ranges of most hydrogen trucks on the road. There are currently no production hydrogen trucks or buses that offer a longer range than their battery-electric equivalents. You'd need significantly larger tanks and adding the same volume in battery would match the range easily. Even with current production batteries (160-200 wh/kg), which are about a third of the energy density of already announced new state of the art batteries (500wh/kg). Batteries are on a path of steady volumetric an mass density improvements. Hydrogen will never get better than it already is.
It's also why hydrogen planes are no longer being considered a viable plan by the likes of Airbus; most of the plane would have to be reserved for hydrogen containment.
For ships, using hydrogen as a fuel is not a serious option either. Simply too much volume. Transporting hydrogen by ship in liquid form loses 1-2% of the load per day to boil off. This is the only way to keep it liquid; boiling it off cools the liquid. The longer the journey, the more hydrogen is lost to unavoidable boil-off, making long-distance transport highly inefficient.
It's actually pretty simple to figure out. Making hydrogen takes energy. You lose some of the energy making the hydrogen. This is not a fixable problem. At least not unless you break the laws of thermodynamics.
When you have created hydrogen, you lose more energy compressing the energy. Then you have to transport it to wherever it's going to be pumped into the vehicle ... both of which take more energy. Then it goes into a fuel cell, which loses more energy. All these losses multiply. And if you know your maths, you know that multiplying numbers smaller than 1 means the result gets smaller and smaller. These losses are significant.
And we're comparing it with putting the energy into a battery directly. It has inherently better round trip energy. Even if hydrolyzers, and the infrastructure to store, compress, and transport hydrogen were free (which they are not), using hydrogen would still be more expensive than that. Because it wastes more of the energy that goes in. So, in addition to the energy losses, you also need to deal with infrastructure cost. On top of regular energy infrastructure.
Anyway, that's all theory. For practice, just look at market price of hydrogen. Most of that stuff is of the dirty grey hydrogen variety creating that wastes a lot of methane. So much, that it would be cleaner to just use the hydrogen in a combustion engine in the bus and you'd have less CO2 emissions. Expending more methane to make hydrogen to have less emissions makes no logical sense.
If you are using grey hydrogen, it is more expensive per mile than methane. Nothing can change that. If you are using green hydrogen, it is more expensive per mile than battery electric. Nothing can change that either. That's just physics and simple economics. Yes there are some innovations in this space happening that reduce the gap a little. But it's never going to be enough.
Right now it's not even close. Unless somebody is subsidizing the hydrogen fuel, you'd be paying way more per mile than with diesel. And not just a little bit. And a common reason to switch from diesel to BEV is that it actually costs way less per mile than diesel. So, instead of saving money, you are spending more money.
Subsidies are hiding the true cost of hydrogen. That's the only reason there are some vehicles on the road. As soon as the subsidies dry up, hydrogen transport use cases evaporate. There are of course plenty of other use cases where hydrogen is needed that make much more economical sense. Using scarce and expensive hydrogen for transport is a poor use of resources. The utopian world where we have vast amounts of hydrogen surpluses does not exist.