Gasoline powered internal combustion engines average around 20% efficiency, cutting edge new stuff still doesn’t really break 40%. Need to keep that in mind! Yes, gasoline itself is very energy dense, but that doesn’t mean we efficiently use it in automobiles.
Amusingly lithium is also really energy dense too. The difficulty is it's only 2-3% of the battery by weight. Upside of that is there is a lot of room for improvement. Not that it's easy low hanging fruit though.
For transport hydrogen suffers a lot of the same issues as lithium. The storage systems are all heavy. Compare with an empty gasoline tank you can lift with one hand.
In terms of energy efficiency in powering moving vehicles then yes, hydrogen is as energy efficient as anything else. That's why I complained about it's energy density rather than its efficiency in that context. In terms of grid storage batteries are ~99% efficient and pump storage is 75% efficient.