It is not always a cheaper option. Especially, if for example, you don’t have natural gas service at all currently. In some areas of Seattle there is no natural gas service and so homes may be all electric if newer, or if older may only have oil heating.
Also, I know you likely didn’t mean to exclude this, but in cases where gas service might be cheaper in the short term that’s only because it’s effectively heavily subsidized and many of the costs are externalized.