I had a discussion with my boss many many years ago - the company with its salary ranges and job categories could not give me enough of a raise to make a difference. Money doesn’t mean that much - in my wildest dreams, a 10% raise (way higher than guidelines) for $50,000 is about $5,000 or $100 a week, minus marginal taxes, so about $55 a week. Nice but not earth-shattering. His reply, “that’s true, but money is a good way to keep score.”
That’s the essence. My tech support work or hobby ceramics might be enough to barter for a week’s worth of food, but the dairy farmer and the tropical food importer don’t want half a ceramic mug set, nor do they need a half-hour of tech support regularly each week; and tracking all those reciprocal obligations is a nightmare, not to mention adequately valuing them. Thus the need for something that everyone agrees is a fair means of “keeping score”.
Fiat currency works because the government(s) agree (usually) to limit the supply to ensure there is not so much that it is not worth much (takes to much to buy anything of value) and not so little that people cannot get some in a fair way to trade for what they want. Before governments were that trustworthy, currency like gold was worth something because the difficulty of increasing the supply kept it stable. (There’s whole books written on how declining Rome debased its currency, mixing copper and lead with gold until coins were worthless; or how the sudden influx of Inca and Aztec gold changed the economy of Spain and the rest of Europe).