Vong had planets which still produced stuff,and quicker spaceships.They could gather force in one place,win,and send to other batte before nids come there.
Even if tere is 100 times more nids then Vong,as long as they could move their forces faster it not really matter.