In its most extreme form (and I’m not suggesting you’re doing this, just exaggerating to make the point) it’s like saying to someone who is depressed that they should cheer up, or that it’s not that bad.
Of course, there does come a time for action, and for making changes. But it’s also possible that changes don’t need to be made, that the “problem” as it were is emotional, not practical.
So, what we can do is listen and validate the feelings, including in all likelihood feelings of powerlessness or hopelessness that make change feel impossible. It can be quite a challenge to keep doing this, particularly in the face of a strong (understandable) urge to say “just do something!” - but it’s likely to be much more helpful.
This is not to suggest that you need to be their therapist, or that you’re not able to share your view. Conversations about what might need to change can be very helpful, but we need to start with the feelings first. It’s important we get clear about what the problems actually are before we set about solving them, and it’s possible your friend’s problem is one of struggling to feel the good in things - what we might think of as an “inside them” problem - as opposed to their life being bad - more of an “outside problem”.
Of course, only they can decide which it is. But if the problem is “in them”, then that is most certainly a problem for therapy. Supporting them to talk to someone then becomes the most useful support you could offer.