At least with the Greeks, they were camped on the shoreline and could feasibly have supplies fed to them by ship from their homeland. What about the Trojans? They were seized for 9 years! Was it taboo back then that you don't starve out a city? Thus the Trojans had no impediments bringing in supplies for the city? Or did they just have that large of an abundance of food?
If I understand correctly, you're asking about the plot of the Iliad?
The Greeks were raiding the coast and the islands. That's how they captured Chryseis and Briseis. Briseis describes Achilles sacking her town in book 19.
The Greeks also hadn't invested the city. The Trojan army was fighting them on the plain. At one point the Trojans almost throw the Greeks into the sea, and manage to burn some of the ships.
But it's Epic, and oral composition, so I'm not sure asking about the details of the plot make a lot of sense. There's a point in the Iliad at which the Greeks decide they need to fortify their camp. Really? They've been there for NINE YEARS and they just now decide to fortify the camp? They didn't think about doing that when they landed?