I'm sure you know people who have problems. Yes, you have problems as well, but others have problems to which you know the solution. And you're a good person. You want to help. You want to give them the easy (or not so easy) answers that have helped you before and that you know to work. You watch your friends - those with the problems - complain about their life, and you wish to say something, to just blurt out the solution so they can use it for great good.
Have you done it? Have you blurted out the answers? What happened?
Chances are they backed away into their shells. People don't want to get solutions to their problems. They want to complain about the problems instead.
Most problems, to be solved, require some sort of change. And change is hard. No matter how easy you make the change sound like, it's still a change, and in the hearer's mind, every form of change is hard, no matter how you put it.
The only way to help people, really help them, is if they genuinely want to solve the problem; to change their life for the better; to do the work. And this pure willingness to change is manifested by the act of asking for help.
So unless your friend or others you want to help come asking for your help, specifically - they come to you and ask for advice - you shouldn't say literally anything at all. You shouldn't tell them the problem will go away by itself (it won't), or that they should do this and this (they won't listen), or that the problem isn't that much of a deal (it probably is since the person is complaining about it).
Instead, shut up. Listen if you want to. Don't stand unnecessary whining unless it feeds some sadomasochistic inner beast of yours. By your actions, let them know you're there if they need you, but don't push it. Lead by example, but don't emphasize how you have your shit together.
People only change if they truly want to, and only learn if they're truly interested. Otherwise, it's a lost cause.