Exactly, the main problem these people are having is not a mystery - it's that they don't have housing. There are often addiction or mental health issues, but anyone who has experienced these problems in the past understands that being homeless at the same time is catastrophic. Giving people housing while they get on their feet is the simplest, cheapest, most humane, and most effective policy. It's been proven to work in Finland and other places to great effect: https://amp.theguardian.com/cities/2019/jun/03/its-a-miracle...
I think it says a lot about the HN crowd that people are downvoting you for saying this. Everyone wants either to police/arrest homeless people (even more than they already are, apparently) or to make their lives even harder so they'll go somewhere else. Neither of those "solutions" addresses the root of the problem - that these people have nowhere to go - and homelessness will continue until they are provided with housing. People love to wring their hands about how homelessness is such a hard problem but they don't want to even consider the obvious solution that would both fix the root problem and treat people with dignity.