Replicators still need energy - most likely massive amounts of energy, playing around with storing, transporting, and assembling matter - and feedstock. Trek has widespread power tech - antimatter, and fusion - that we don't, and won't for a good long while.
Trek has planets and systems they can strip down a hundred times over. We don't. We get replicators today, the grid will blackout after the first few minutes, they need a supply system to keep them fed/expand their capabilities, and people will replicate guns, antimatter, bombs, all sorts of nasty stuff first than just food or knick knacks, or flood the market with gold, silver, uranium, plutonium - if, of course, the machine is coded and set up to disperse such things. If we just get a food or medicinal coded replicator, then that'll help matters but it'll probably be whisked away to a lab to study for generations or be used, at best, as a sort of panacea maker, until it runs out of feedstock or energy and then becomes a wreck.
Scifi has dealt with this concept a lot - under the
Santa Claus Machine plot. It's not pretty and it won't be pretty today. But that is the whole point of trek - they're more advanced, they've gone through more trials as a civilization and planet, they have more knowledge to deal with, wield, and appreciate such things.