There's a simple test for whether you should take someone's advice: do they have what you want? This sounds obvious, but people violate it constantly. They take career advice from people stuck in jobs they hate, relationship advice from people who can't maintain relationships, and startup advice from people who've never built anything successful.
Why does this happen? Partly because we're bad at thinking clearly about what we actually want and tend to avoid hard truths. But there's a subtler version of this mistake that's harder to avoid: sometimes the person does have what you think you want, but when you look closely, you realize you don't actually want their life. One example is Michael Phelps. Most people admire him and would love to have his success. But do they want to spend 6 hours a day in a pool for decades? Do they want to structure their entire life around a single obsession? Probably not.
Another reason is that advice is about changing what you do. The best advice comes from people who have actually made the kind of change you want to make. They know what it's like to switch paths, and how hard it can be to think and act differently. People who haven't made that change often don't realize how tough it is.
That's why the best advice often comes from people who had to find their own way: they know where you can go wrong. This doesn't mean you can't learn anything from someone like Phelps. But the lessons are meta-lessons. Maybe in your field, the equivalent of pool time is studying algorithms, practicing presentations, or talking to users. The specific tactics don't transfer, but the underlying principles do.
The best advice comes from people who've made smart choices to get where they are; whose lives you'd actually want, not just admire from a distance.