French ships were blocking the bay, so that Cornwallis and the British there couldn't get supplies. Also the British couldn't escape from the bay.
And, Washington and his army where coming from land. So Cornwallis couldn't escape from any direction. Cornwallis was outnumbered as well, 19,300 soldiers (10,800 French 8,500 Americans) 24 French wars ships, and 375 guns to 7,500 British soldiers and 240 guns