There's causation between homelessness and fentanyl use. Being homeless is absolutely hellish in this country; if your life has fallen apart that you're truly living on the street then there's little support and a lot of danger. Opioids might be one of the only options for you to actually feel happy when the rest of your life is terrible and you've run out of options.
It certainly happens that people get addicted to opioids and then their lives fall apart as a result of addiction but it's important to consider how despair itself can lead to addiction.