We had a great discussion several yrs ago that touched on this.
I pointed out at the time since nearly all the ST shows consists of scenes of Starfleet personnel going about their duties, we aren't usually shown them paying for anything because the military organization to which they belong takes care of their needs, in the manner a navy feeds, clothes, houses, doctors-up, etc, their personnel onboard ship or at a base without overt payment tendered. Even situations where one might expect some sort of quid pro quo transaction like Guinan's lounge or the Cardassian tailor's shop on DS09, there is probably some 'invisible' means of payment being debited from the buyer and credited to the seller, kind of like the 'digital wallets' but without visibly pulling out a smartphone and diddling with it!
Roddenberry was said to be sympathetic toward a Socialist worldview, and it seems he conceived of the Star Trek future as consisting of a benign totalitarian regime that requisitioned services from its citizens and in turn provided their needs and some wants according to some formula, without explicit beancounting to determine the citizens' "account balance" and citizens having to decide among competing wants and needs and costs to optimize their own finances. Then again, if the Federation has what we now call "digital currency" for citizens and private businesses, we wouldn't necessarily expect to see visible money changing hands when something is bought and sold, either. Internally, the Federation government probably has some way of quantizing wealth available to make things happen such as build a starship, that doesn't readily translate to units of currency even though the construction gets done and everybody gets compensated in some way in the process. Therefore, Capt. Picard can't quote the "cost" of constructing the
Enterprise-D in actual currency. We were seldom shown private entrepreneurs in at least the original series and TNG, and those tended to be unscrupulous con artists if not somewhat villainous, and comic figures to boot, e.g. Harry Mudd, Cyrano Jones (noted purveyor of Tribbles), and the Ferengi.
The 'replicators' certainly are an economic game-changer so far as pricing and costs of anything that can be replicated is concerned. Assuming the First Law of Thermodynamics holds and the input for replicators are energy to convert to mass as m = E/(c squared),
the effective cost of a thing becomes the cost of energy from which it is made. Kirk once had a replicator whomp-up fine gems to show an outsider that offers of that sort have no value to the Federation. (IN Mandos, FĂ«anor is weeping!) What are the primary energy sources that power the Federation? Not antimatter, I understand that's just a storage and conveyance medium. I don't think it's ever explained.
On the other hand, some items like dilithium and gold-trimmed latinum are explicitly non-replicable. Apparently many of these things must be obtained from outside the Federation thru trade, therefore something must be offered in exchange. IIRC, in "Friday's Child" the Federation was offering pharmaceuticals. In "The Cloud Miners" not only do we learn "zenite" can't be created by a replicator and therefore must be purchased, but Starfleet, rather than a private entrepreneur with a private ship, must purchase and transport it to the users. (OTOH, there was a private freighter in "Charlie X") As the supply of a commodity is effectively more limited, there is a real market dynamic involved.