In Star Trek money exists but there isn't much use for it because technology has made material abundance cost approximately nothing.
Star Trek doesn't show the 50 billion landwhales watching Netflix all day, because it makes for bad television. It shows the 1% who still work even when they don't have to, who work because they want to.
People very much have to work in Star Trek. If they don't, unsuspecting enemies like Q, the Romulans, or the Borg would eradicate the Federation's existence. They also have their own forms of scarcity. Replicators are somewhat common but Holodecks are not and members of the crew must schedule time to use them. Resource allocation is determined through the decisions of leaders in the beauratic hierarchy and the longer you watch, the more you see the ways in which the Federation falls short.