Hydrogen is conventionally produced by steam reforming natural gas, a process that wastes some of the energy stored in the gas while releasing large amounts of CO2.
You would go to one of the places where the ore has already been dug up, been processed for its other contents, then ask politely if you can have the wastes left over, then process them.