If you are at risk of becoming homeless or are currently without stable accommodation e.g. you are sofa-surfing with friends, there are various organisations you can contact for advice:
University of London Housing Advice Team
https://housing.london.ac.uk/get-advice
Shelter
https://england.shelter.org.uk/get_help
https://england.shelter.org.uk/housing_advice/homelessness
UK Government
https://www.gov.uk/homelessness-help-from-council
If you are on a visa that states 'No recourse to public funds' you are unlikely to be able to access some forms of support from the government. You would need to let the borough council know about your status.
Crisis
https://www.crisis.org.uk/get-help/
St. Mungos
https://www.mungos.org/
The Connection at St Martin-in-the-fields
https://www.connection-at-stmartins.org.uk/get-help-homelessness/
Citizen’s Advice
https://www.citizensadvice.org.uk/housing/homelessness/applying-for-homeless-help/check-if-you-can-apply-for-homeless-help/
Centrepoint - services for people aged 16-25
https://centrepoint.org.uk/youth-homelessness/get-help-now/