Hydrogen can be mined but this is not done in large quantities at this time (much of the worlds helium comes out of natural gas wells. "
natural hydrogen (also known as native hydrogen)is generated by geological processes. Emanations of Hydrogen have been observed in many places. As a consequence, subsurface accumulations of hydrogen drilled “par hazard” and its direct extraction, although still anecdotal today, is beginning to be seriously considered as an abundant source of truly green and inexpensive H2 (Prinzhofer and Deville, 2015; Moretti, 2019)". Personally I am doubtful about this becoming a significant source of hydrogen.
There are four main sources for the commercial production of hydrogen:
natural gas,
oil,
coal, and electrolysis; which account for 48%, 30%, 18% and 4% of the world's hydrogen production respectively. Fossil fuels are the dominant source of
industrial hydrogen. One method is to put microbes into gas reservoirs where they convert hydrocarbons to hydrogen. Victoria has an experimental plant to produce it from brown coal. However most of these are not very green. The green method at the moment is producing it from water, but economics is the question.
People have visions of the burning Hindenberg, but it is not obvious that hydrogen is more dangerous than gas or petroleum (I would not know but simply read this).
https://hydrogen.wsu.edu/2017/03/17/so-just-how-dangerous-is-hydrogen-fuel/
Hydrogen is already used as a fuel for some vehicles and trains in Europe.
https://edition.cnn.com/travel/article/coradia-ilint-hydrogen-trains/index.html
All fuels are "energy storage" mediums, and that includes hydrogen as you say. A major issue is whether nature provided the energy needed to produce the fuel store (petroleum, gas, coal) or whether we have to supply to supply the energy ourselves. For example, hydro power already has its potential energy supplied by nature, but pumped hydro requires us to provide energy by pumping it back uphill. But we do this by using natures solar energy during the day when we produce more than grid demand requires. The idea is much the same with green hydrogen produced from water (using solar during in the day).
In the end it comes down to the balance sheet.....everyone is screaming about increasing energy costs already, which gives some indication of what the market (humans) will bear.