There are more reasons to ban gas in buildings than just global warming.
There's the fact that you are actually burning fuel, which released noxious fumes into the home [1]. There's mounting evidence that this sort of exposure has pretty negative health implications [2]
Gas is also inherently dangerous, more-so than electricity. There's been more than a few examples of exploded homes/buildings due to gas leaks [3]. All it takes is for someone to accidentally leave a burner on unstarted (or for a kid to do it while playing around the home).
But as for cooking, heat pumps won't work there. What you're more likely to see is either homes coming standard with thick enough lines to power everything or stoves with batteries (think about it, a stove is off 90% of the time, so why not slowly charge a battery during that time for the times when you need to cook fast?)
[1] https://pubs.acs.org/doi/10.1021/acs.est.1c04707
[2] https://www.atsdr.cdc.gov/toxfaqs/tfacts175.pdf
[3] https://en.wikipedia.org/wiki/Ronan_Point