Let's imagine a scenario. You're with a close friend and they're telling you about a struggle going on in their life. You offer them some helpful advice. But, on your walk home, you start to think about how you could apply that helpful advice to your own life.
That's my main point here. When you're listening to your friends' struggles and trying to find ways to help them, the advice you give might be advice you need to hear as well. We can learn from the people around us and the struggles they endure. We can learn a lot from our fellow humans and from ourselves by the ways we handle difficult situations.
Just because you gave this advice to someone else does not mean that you shouldn't apply it to your own life. If you're unwilling to apply the advice that you gave your friend, maybe you shouldn't be giving that advice. It's like the famous mantra: treat others like you would like to be treated. If you wouldn't take your own advice, your friend probably won't either. So, try to only give helpful advice that you would take yourself if you were in your friends' position. It'll make you a much better friend overall; it'll show your friends that you take their problems and concerns seriously and that you are willing to do whatever it takes to help them.
By taking your own advice, you are proving that you learn from your mistakes and other peoples mistakes in order to become a better person. It can be really difficult to take your own advice, but it will be completely worthwhile. Nobody ever claimed that becoming a better person is an easy process, but taking your own advice is a helpful step to get there.