Of course along with giving housing to the homeless, you also have to act on the supply side. Obviously I'm a big fan of upzonings and increased density. But Alan Durning has pointed out that along with encouraging more construction, we need to think about relegalizing flophouses and boarding houses and other forms of ultrasmall, ultracheap housing that can serve vulnerable populations.
At any rate, that's how you fix homelessness. You build more housing, including more units designed to be cheap. Then where necessary you step in and give people housing. Once people have a place to live, you have a solid foundation to work with people on other problems they may be having in their life.