Don't offer unsolicited advice
Unsolicited advice is typically poorly received. For advice to be effective, the recipient needs to know that you're well-intentioned and be open to taking suggestions.
When people share things that frustrate them, they're not inviting you to give your opinion. Resist the urge and ask whether they're interested in brainstorming solutions or if they'd rather that you listen. Often, venting is more about catharsis than fixing a problem. When they're interested in your opinion they'll ask, especially if they know that you'll only share your advice when given explicit permission.
Think carefully about whether you need to say things that are obvious. Usually people already know. Just because what you're saying is "right", doesn't mean they'll want to hear it. By waiting for permission to give advice, you're less likely to get people upset when you're trying to be helpful.