The real problem with fuel cells is the infrastructure needed. Electricity is already universal and can be generated easily from a variety of local sources. Petrol and diesel are produced as part of an existing worldwide petrochemical industry and very cheap (before taxes). It can also be stored and transported without special containers (shades of some Covid vaccines!). At least early motoring pioneers could buy petrol from hardware stores in the small quantities sold for pre-existing other uses - try buying liquid hydrogen in the wilds of Sarf London!
Until there are significant alternative uses for hydrogen even the industry producing it will remain uneconomically small and nobody is going spend money on the complex new infrastructure that would encourage take up of vehicles powered by fuel cells. Its like the pipedream of unlimited free energy from fusion or Betamax.
NB. Younger readers might need to google the last word to understand my point.