Homelessness and visible homelessness need to be distinguished here. The large majority of homeless people are not the ones you notice on the streets. Most try to be discreet. Some have jobs. A person who lives in their car is considered homeless.
The best measure to reduce homelessness is to provide timely support for people who are being evicted from their homes before they lose their jobs (which they might still have) and before their mental health deteriorates. This is the point at which assistance is most effective. You have heard the saying, "an ounce of prevention is worth a pound of cure". Such programs have been applied to great effect in e.g. London.
The way to respond to people who have experienced chronic homelessness with complications is different and more difficult.
The Simon Community where I live went around the city one December and counted how many rough sleepers there were. I forget the exact figure but it was less than 100. Meanwhile there were thousands classified as homeless due to being in temporary accomodation. And this is a part of the UK well known for having a homelessness problem.