Hydrogen is not sitting around somewhere to be pumped out of the ground it must be split from something else like water which is very energy intensive.
It is very low density and must be highly compressed / liquefied, much more energy.
Even liquefied has very low energy density per volume.
It is very difficult to store and transport safely in the highly compressed or liquified form.
Might as well just charge a battery with the energy rather than creating hydrogen.