I think to phrases like "practice what you preach" and "if you make your bed, you must lie in it." These kinds of expressions are passed down through generations. Why do you think that is?
I tend to think they're effective echos meant to teach us things about ourselves at the same time as we aim to guide others. When you're asked for advice by a student or a friend, and you explain that you recognize room for improvement in their situation or behavior, you will also see room for improvement in yourself. The question is, will you choose to recognize and learn from it?
During my school days, I recall my mom telling me I had to wear socks in my shoes to class unless it was at least five degrees Celcius outdoors. My desire to wear bare feet in my shoes on colder days led me to remove the socks many times once I had walked down the hill to my bus stop. I though what she didn't know about my feet wouldn't hurt her. On a few occasions when I did catch a cold as the result of no socks, I realized it would've been useful to heed her advice.
I suppose what it comes down to is many people believe they shouldn't tell other people to do things unless they would be willing to do it themselves. Yet, what we choose to tell people may also represent what we think we need to hear. We may advise others based on what we would do in their circumstances, but since it isn't us, our advice may be misdirected or a projection.
You may hear of an alcoholic father tell his son not to drink, when he goes right on drinking himself. You may learn of a single parent encouraging a child to study harder to become accepted to university when this is a dream the single parent had yet to realize. You may advise a friend to elope when you never had the courage to make such a decision yourself. You may encourage a brother to take a job abroad when but for your fears, you only dream of the experience yourself. You may advise friends not to get their children involved in too many activities when your toddler's agenda is busier than your own. Whatever advice you offer to others may be what you most wish for yourself. In principle, these choices you suggest may be great opportunities for the people you advise, but their choices are ultimately theirs. Your life choices could benefit from your advice.
Above all, listen closely to yourself. You can always become more attuned to who you are and the steps you need to take to become the person you envisage. Yoru offers clues about what to do.