Most hydrogen is produced from natural gas so would not really be a replacement for the foreseeable future. Gas infrastructure is not designed for transporting hydrogen so leaks would be significant. Hydrogen can also penetrate into steel piping and cause it to crack and deteriorate more rapidly.
Biogas, sure if there were enough production available.
Natural gas infrastructure and heating could be transitioned to hydrogen or biogas.
Most hydrogen is produced from natural gas so would not really be a replacement for the foreseeable future. Gas infrastructure is not designed for transporting hydrogen so leaks would be significant. Hydrogen can also penetrate into steel piping and cause it to crack and deteriorate more rapidly.
Biogas, sure if there were enough production available.