Not exactly. You don't build them; I don't build them; we don't build them - either a developer or a city government does. Either choice has its problems.
The developer prefers to put up low-density luxury housing for maximum profit. Where will he do it? On expensive downtown real estate he has to buy from another profit-seeker, or on the greenbelt that had hitherto served all the citizens? Well, he can't do the latter without the collusion of some level of government. Will/has it cost him substantial campaign contributions? that will be added to the price of the homes. Very likely, no vagrants allowed in there.
If the city does it, it has to build on lands already owned by the city and designated for some other purpose, or else buy land at market value. It has to plan high-density, low cost housing and contract out the actual construction, using public funds, and make plans, and if necessary pass bylaws, to keep down the cost of owning or renting those units.
City councils are not all just sitting on their night-sticks, ignoring the problem of homelessness; they're trying to solve it, in various ways, according to their budgets, their political clout, their level of corruption and the extent of their constituents' concern.
https://www.toronto.ca/community-people/community-partners/affordable-housing-partners/housingto-2020-2030-action-plan/
https://www.theguardian.com/housing-network/2013/nov/26/london-council-house-sale-southwark-colley
https://www.citybureau.org/newswire/2023/2/3/how-chicagos-2023-mayoral-candidates-plan-to-address-the-affordable-housing-crisis
No, it was seriously misrepresented in the OP, and several people have made attempts to clarify the issues of homelessness and substance dependency and crime - which do not necessarily come as a nasty, disposable package. A great variety of people are involved - real, live, human citizens - for a great variety of reasons. There cannot and should not be a single, simple, final solution. Governments and voters have to acknowledge, identify and address the causes of this problem before they can begin to solve any part of it.