I don't give advice at all. I used to do either of two things when I gave advice- signaling and controlling. I wanted to signal my smartness so that they respect me. Telling people what to do gave me a bit of control over their lives. This was an egoistic attitude.
You might argue that a person only has good intentions when he/she gives advice. My argument is that good intentions don't mean good outcomes. Your good intentions but bad advice might destroy someone's life. People are bad at giving advice.
Also, I am correct only 10% of the times in my life. People generally think that they are right most of the times and the reason is that they remember only right decisions of life. Since I journal all my decisions, I know when I am wrong and how often. So, there is 90% chance that I am misguiding someone by giving advice.
I have also stopped giving book recommendations for this reason. I have read very limited number of books in my life, and there is no way I have figured out which book will be best for you to read in your life.
My alternative to advice giving is that whenever any of my friends comes to me with a problem, I try to ask right questions so that they can figure out on their own what to do. You don't take accountability away from other person which is important for them when they make a decision.
I also discuss ideas/experiments that they can try. Giving ideas feels more liberating than giving advice. They can easily reject ideas but rejecting advice seems a bit difficult. The change in vocabulary is minor but it can make a lot of difference in how we approach this situation.