That's a common take, but a well-designed carbon tax could be made revenue-neutral and non-regressive.
In other words, the amount it takes in can be given back to the average person -- in forms of tax rebates, investment in public transit, education, whatever. In an ideal world a carbon tax would have no adverse impact on lower and middle class people.
I should also add that in that world higher electricity cost due to carbon tax is a good thing -- it'll help carbon-neutral sources of energy to compete and replace the more dirty forms. Which is exactly what we want.