I don't have compassion for the homeless even though I just got out of homelessness 4 months ago
It is that seeing them makes you uncomfortable or are you unable to understand their suffering?
Let's just say, "Stop making me think about my time as a homeless man."
Given that you were homeless as well, you should have more empathy for the suffering that they are dealing with. Since you have been there before, you can be a beacon of light to show them how their situation can change.
I had to live in my moms car for a few months, it was an experience I won't ever forget.
Have you ever talked with other homeless people in similar situations? There might be other people in your position that would like to learn how you eventually made it out and got back on your feet.