It’s by far the #1 cause. People lose their job or get priced out of their home and then either can’t afford to move elsewhere or don’t want to leave their support network, so they just… stay. LAHSA tends to provide good data via their annual surveys:
There is also an abundant number of second houses that people own that are not rented that could house every single homeless person 25 to 40 times over.
This is fallacious thinking. It would be a huge effort, practically and legally, to increase the occupancy rate of existing dwellings from its already extremely high level of over 97% to something like 99%. It is way easier, cheaper, and more practical to attack the denominator instead.
Yes, I worked to create the most recent census of homelessness in my county. That's why I am aware of the fact that an overwhelming supermajority of current homeless express a wish to live in independent, affordable rental homes, like the rest of us. But you don't have to personally conduct the census to know this; you can just go read the results.