Manifests of passengers incoming to U.S. ports were written before the ship left the foreign port.
The names of the passengers were written down on the manifest at the foreign port.
It's just like today, when people fly on planes. A manifest of passengers on each plane is prepared before the plane ever takes off. The manifest is not written after the plane lands at its destination. It is written before departure. Of course, it's all computerized today.
Regards, Sherri Bobish, Princeton, NJ