Blue hydrogen can be made from coal but by far most comes from natural gas. Carbon dioxide is produced and must be collected and stored.
Scrubbers that collect carbon dioxide exist but releasing the carbon dioxide for use requires energy.
Most scrubbed carbon dioxide is injected into oil wells to increase production. You wonder how much escapes from those oil wells with the oil.
Hydrogen is a clean fuel but not an energy source. When made from dirty energy, the long tailpipe argument applies.