A single ton of hydrogen requires ~50 MWh of electricity. Small special-purpose ammonia plants, which are common for some industrial applications, typically require on the order of 50 tons of hydrogen per day. This would require ~2.5 GWh of electricity per day via electrolysis. To put that in context, that is in the same ballpark as the average output of the largest solar farms ever built in the US.
The largest ammonia plant in the US requires around 2,000 tons of hydrogen per day. That would require 100 GWh per day to produce by electrolysis, which would require the entire output of a large hydroelectric or nuclear power plant, much like large aluminum refineries. Otherwise, you need to move a lot of electricity or a lot of hydrogen to have good efficiency, and there is infrastructure for neither.
Converting natural gas into hydrogen is also energy intensive. One of the big advantages of natural gas is that your hydrogen source is also your energy source and there is vast infrastructure for moving natural gas around.
Building green hydrogen pipelines likely makes more sense than trying to backhaul electricity from diffuse sources. A single hydrogen pipeline can reify a lot of electricity production without the concomitant transmission and management infrastructure.