Social housing does work but can be hard to do well.
Places in London that built large scale apartment complexes for social housing saw them turned into slums with rampant drug use, violence and criminal activity.
And it can be harder to get smaller-medium density housing to work because you're constantly fighting against local governments and NIMBY types.