As an illustrative example, you could get the same heating effect by putting the electricity through a computer or other appliance, or by putting the gas through a heat engine to produce electricity which is used inside the home and warming the house with the waste heat.
I know about heating by computer because for the last several years I've heated my apartment solely by mining Ethereum on my computer. The only dedicated heaters that my apartment has are resistive electric heaters built into the walls, so it's better for me to get a little Ethereum plus heat than just heat.
You could frame it as fraction of the heating that is possible at carnot efficiency, I guess. Ie. the amount of heat you put into your room / the amount of heat you with a perfect machine could at typical temperature differentials.
Then an element would be about 10-15% efficient (as measured at the wall vs. an ideal heat pump) and gas would be...awkward to calculate (I'd have to open up a textbook if not just multiplying max COP and max thermal efficiency of a heat engine), but somewhere in the 20-30% efficient range. Electric including a thermal generator would be in the 8-10% range somewhere.
Electric heat pumps would be around 50-70% by this metric, or in the 25-40% range somewhere if using a thermal generator.
Thinking about it, I like this metric because it really highlights how much more wasteful burning gas to heat a home with electricity is if you're not using the waste heat for something. If you're not using renewable electricity, even heat pumps don't break even if they're not high quality and well maintained.
Really drives home the importance of insulation and good curtains in cold areas.
Edit: looking at absorption heat pumps, they seem to be a little better than my guesstimate. I think they outperform fossil fuel powered electric heat pumps.
Yes there are inefficiencies at generation and transportation. But I don't think those are usually counted when talking about the efficiency of a home device. And it certainly won't be enough to bring it down to 0%.