Humans don't have a ton of preferences for the electricity they consume or the water they drink, just that it exists. It's a commodity, so a good task for government. Housing is not an undifferentiated commodity and is subject to extreme variances in preference. Markets do differentiation and preference matching infinitely better.
Hence why Government housing always takes the form of a utilitarian blight on the community with giant towers of tiny apartments with tiny windows...doesn't matter if its communist Russia or the richest capitalist city on earth (NYC), all government housing results in the same outcome.
Assuming someone will chime in with some "halo" government housing project in the nordics that represents like 0.01% of the government stock there but socialists will use as propaganda. However, it's important to remember these are not cherry picked examples, they are median examples:
[1] NYC government housing: https://www.brickunderground.com/sites/default/files/styles/...
[2] Russian government housing: https://i.redd.it/twz37r739xse1.jpeg