The studies have been done bro, there is only one solution and I just described it
Also we don't actually live in a capitalist system, health care and housing are already socialist in many many ways. It would be easy to pass govt regulations making it easier to build housing. Capitalism is not the problem because we don't actually live in a fully capitalist society dude.
A lack of affordable housing compounds the challenge, but to say housing is the only solution when it isn't even a good partial solution misses the entire problem.
The worst part is that it isn't even about money. SF spends a huge amount of money on the homeless, but it doesn't solve the issue because many of those sleeping in public are unable or unwilling to accept that they live in a society and that it rules do apply to them, as well.
I don't much like Orban, but if a community does nothing, what you will eventually get is something like that.
Or, in the case of Hungary, make homelessness illegal entirely. https://edition.cnn.com/2018/10/15/europe/hungary-criminaliz... / http://abouthungary.hu/fundamental-law/qa-on-the-upcoming-am...
Homelessness is a complex social problem that requires quite a lot of social intervention work to fix. It's not something that can be papered over with a wooden shelter.