Immediately, you can get a bed in a homeless shelter. Most large cities have them. In my city, you can stay 3 months at a time. Then move to the next shelter and stay 3 more months there. In cold climates, they are more crowded, but in the summer time, many homeless people like to sleep outdoors. You also get fed twice a day. And you can use their phones to look for a place to rent. They usually have counselors to help you find a job.
The next stage might be to rent a room. Landlords that divide their building up into individual rooms rentals are used to renting to less stable people (because a really stable person with a good income will rent a full apartment). Be truthful with the landlord. Be faithful about paying the rent, and he will give you a good recommendation when you are ready to rent a full apartment.
Now you have a good rental history and a good recommendation, a job, and an income. So you can rent an apartment. If a landlord turns you down because of a background check, then he has to give you a copy of the information from the
tenant screening background search
. Then you can write to the background check agency and explain the good things and minimize the bad, and correct any errors. Fair Credit Reporting Act is the law that requires the landlord to give you a copy of a bad report. Any landlord should know about this law, because he can get a big fine if he does not comply.
Also, the big 3 credit reporting agencies must send you a copy of your own credit report for free, if you ask for it (once per year). The big 3 credit reporting agencies are Experian, Equifax, and Transunion.
The local library or the homeless shelter will have computers so you can search the internet for room and apartment rentals.