If you are a young single man in the UK, your prospects will not be great if you become homeless. You will not be deemed by the local authorities to be priority need and therefore they will be under no duty to house you. If you can't get a deposit for a private tenancy, your only recourse will be a homeless shelter, full of alcohol and drug users and the likelihood is that even they will be have no beds left for you.
As a substance misuse worker, I meet a lot of young men in this position. The most common reason why they were homeless was because they had been living with their girlfriends. The relationship had ended messily and they were kicked out with nowhere to go.
Are you considering moving in with your girlfriend? Ask yourself, what is going to happen if the relationship ends? Will you be able to move back in with your parents? Will you have money to privately rent?
My advice, if you want to avoid becoming homeless is to wait until you are ready to get married. Don't move in together on a whim, but prepare yourself to be a husband and father and get married. Make a real family, not a makeshift living arrangement.