First of all, this reason is probably related to you. He has alienated you. You need to review whether you have done anything wrong in the process of getting along with him. In other words, it is very likely that some of your own actions caused his unhappiness, but you didn't notice the problem yourself.
For example, everyone often goes out to eat together, but you never pay for it for various reasons. It's always your friends who pay. Over time, I think everyone will bear a grudge against you, thinking that you are a miser and penniless, or that you can't get paid.
For another example, for example, your good friend often shares some personal secrets with you, and these secrets are inadvertently revealed to others, and your friend knows from other sources that you have leaked his personal privacy, then he will inevitably think that you are not strict enough, so keep a distance from you.
In my opinion, since he can be called your good friend, that is to say, he has not alienated you before, the problem is likely to happen in the near future.
The first thing you have to do is to reflect on your recent contact and see what is unusual recently. I think if you really pay attention to this relationship and make a careful summary and analysis of what happened during this time, you can find the contradictions.
The second thing you have to do is to find out the reasons for the contradiction, reflect on your own mistakes, and then find a suitable opportunity to admit your mistakes to your good friend, explain the reasons to him, and try to get his understanding, so as to bury the hatchet. If you really can't find a more suitable time, you can also invite him to dinner alone and ask him out to have a good talk, as long as there is no problem in this world that communication can't solve.
The third thing you should do is to avoid any misunderstanding and contradiction in the process of getting along with your friends in the future. Be generous with your friends. Of course, you should choose those who can be trusted as friends. The most important thing to treat friends is sincerity. Although you are not expected to do anything for your friends, you can't always take advantage of them in the process of getting along with them. Reciprocity is the way to get along.
In our life, there are many friends, some are superficial friends, and some are probably lifelong friendships. If you lose a friendship because of your own mistakes and carelessness, I think it is absolutely regrettable, so if there is a problem in friendship, then find out the problem, analyze it and solve it, and don't let misunderstanding become a stumbling block to friendship.