Electrification is good for climate even when it's based on fossil fuels - the efficiency of electricity when consumed is higher than that of burning fossil fuels by the end consumer. Sequestration will also be easier if you have to do it at one source than at millions of targets.
But forget climate for a moment. Electrification is also good for other anthropogenic harms such as air pollution. One of the biggest sources of PM 2.5 across the world is indoor wood burning. In India, indoor biomass consumption in the form of wood, dung etc for heating, cooking and other uses is the biggest emitter of PM 2.5, but even that doesn't tell you the whole story: as primary sources of domestic labor, women across India breathe the worst kind of air emitted by chulhas well before it dissipates into the atmosphere.
Pollution's injustices are gendered, like so much else.
The electrification of heating and cooking will be a massive health benefit to millions of people. This is, of course, the electrification of consumption, not production, which is, thankfully, increasing across the world.