Heavy vehicles need fuels which provide high energy density for as little space as possible and which can be replaced quickly once depleted. Hydrogen is being looked at as an option to replace diesel, but it has numerous disadvantages as a gas or liquid which need to be managed. Ammonia (NH3) as a H2 carrier is however much easier to handle than H2 and still provides many times the energy density of batteries.
https://amogy.co/amogy-presents-worlds-first-ammonia-powered-zero-emission-semi-truck/