It's actually quite interesting that the Star Trek universe doesn't appear to have
What it has instead is minuscule space scooters capable of carrying less cargo that the classic coastal cargo ships of the 20th century. In order to supply even an ordinary city with something that would make a difference, you'd need thousands
of those ships, each doing daily trips. In order to keep a planet supplied with raw materials or food, you'd need hundreds of millions. Yet an effective siege involves only stopping a handful of ships.
If planets weren't capable of surviving indefinitely on their own, the Star Trek universe would need to feature freighters of appreciable size - say, boxes a few hundred kilometers on the side. Not only are such things never seen or spoken of, but our heroes seem to treat space structures of such a scale as abnormal.
Essentially, the self-sustainability of Star Trek planets is confirmed. Only very special cases, such as the 8,000-people Tarsus colony in the "Conscience of the King" backstory, depend on external supply. Whatever freight traffic there is to other places, it's apparently on items of luxury or sentimental value, or on extremely
small quantities of items or substances that are difficult to replicate (that is, apparently just a few barrels of the stuff per year).