This is a very interesting topic.
This article says that most of the world's hydrogen is made from methane, which results in carbon dioxide being released to the atmosphere, as opposed to electrolysis which is entirely clean. I personally think countries should be investing in nuclear energy and bringing the costs of electricity down to make hydrogen more attractive.
I don't think nuclear energy is the best answer, not all countries have money to build and maintain nuclear power plants and we also have to worry about waste disposal too and it's astronomically expensive to do the safest and cleanest disposal of nuclear waste materials. Unless they find a solution to disposal, building and maintenance, nuclear power plant isn't the best option.