I love that you are asking this question and it makes me so hopeful for our future knowing that students are thinking about this issue!
There are SO many ways that studying psychology can help people currently experiencing homelessness.
I studied psychology as well! I ended up working in corporate social responsibility and we do a lot of work to help are our currently unhoused neighbors through connecting our corporate employees to non-profits that are helping people experiencing homelessness, organizing volunteer events, drives, and fundraisers.
You could use your degree to help people that are unhoused due to mental illness by becoming a psychiatrist and help people medically. You could use your degree to work in a rehabilitation center. Become a social worker. You could use your degree to help at a multitude of non-profits that provide help and services to people.
Homelessness is such a complex issue. People end up without a home for a multitude of reasons! If you are interested in learning more about the complexity of homelessness there are a couple of books I would recommend reading:
The American Way of Poverty
Hobo's, Hustlers, and Backsliders
Hope this helps!