For most of human history bartering did not happen between individuals, it happened between communities or families.
Within a community they had a gift economy, from each according to their ability and to each according to their need.
Even between seperate communities there was gift economies, the excess was simply shared.
With agriculture came more long term food storage, which made bartering between communities more popular, but before that if you had excess and no way to store it why wouldn't you just give it away? The gift economy strengthens social bonds, and mutual benefit between communities.
Proto language evolved to keep better track of seasons, essentially written language evolved from calendars and keeping track of time, way before anything you could call money.
Whether a culture created one before the other depended on that cultures needs and resources.
If everything was abundant all year round and you lived in paradise you didn't need to invent anything but did have a lot of spare time for creative and social pursuits.
If you lived somehow harsh you had insensitives to invent things that helped with survival.