I'm not sure how much more clear cut you can get when Jean-Luc Picard outright says, "You see, money doesn't exist in the twenty-fourth century."I was talking about TOS / 23rd century. But even so, Picard is saying, in a convoluted way, that "money" still does exist! It's just not "money" as we understand it. He says "the acquisition of wealth" isn't important, but "we work to better ourselves". That implies that you get something in return for bettering yourself, and your net "wealth" is how much better your are than someone else. Ergo, you get "paid". Maybe it's not money, but it is goods and services that you trade "for the betterment of society", and how much you contribute is determined by how much you can share with everyone else (i.e. it's a socialist society based on competing levels of "be best"...).
As I said, what "money" represents has shifted over time, but it can't be eliminated.
As for getting something in return for bettering yourself, I guess the 24th century is a LOT nicer than the 21st. I know far too many people, possibly including myself, who not only did not get much, if anything, in return for bettering themselves--you're also extraordinarily lucky if you aren't permanently punished in some way...