Trek as a whole really glossed over the whole "antimatter production" problem, to the point where it wasn't even documented until the TNG TechMan.
Ships always had as much as they needed, it seemed.
The only logical thing to run out of was antimatter, since it is so difficult to make. Years in orbit around a star using solar power to make enough to travel a few light years. The show should have been a quest to find post-warp cultures to trade with without pissing them off.