The main advantage of money over barter is that money is always going to be usable. Barter is very often not possible. This is because of the need for what is called a “coincidence of wants” (sometimes called a “double coincidence of wants”).
Think about how barter works. You have to trade something you have for something you want. The problem with that is that the other person also has to want the thing that you have. This is the coincidence of wants. Let’s say that I am a teacher. If we have a barter system, I am going to have to find someone, for example, who wants to be taught and who has some chickens and rice for me to eat. I will have to find someone who wants to be taught and who can make me clothes to wear. In other words, I have to find people who have the things I want and who want the things I have to trade. There are going to be many cases where this will not be possible.
Thus, the main advantage of money is that it can be exchanged for anything. Anyone will take money because it is always valuable to them. By contrast, the things that I have to barter might not be valuable to various people and so it will be much harder to find chances to trade.