It's not easy to detox from opioids if you don't have a home, or to get treatment for mental illness if you live on the streets.
We have a pretty good idea that housing first works, and is probably cheaper than other approaches.
https://www.homeless.org.uk/facts/our-research/housing-first...
https://www.theguardian.com/commentisfree/2018/sep/12/homele...
https://en.wikipedia.org/wiki/Housing_First