The place where the precipitation falls determines the place where the drop will eventually return to the sea and in which sea it will be. A very simple example: in the Black Forest, on top of a mountain, two drops fall together in a rainstorm on the ground. One drop just falls on one side of the highest point of the mountain, the other drop on the other side. As a result, the first drop, via streams, mountain streams and a tributary such as the Neckar, ends up in the Rhine and eventually in the North Sea. The other drop flows on the other side of the slope together with countless other species into the Danube and eventually ends up in the Black Sea.
We are dealing here with two concepts: the catchment area and the watershed.
The water catchment area of a river is the whole area that drains onto that river. As an example, the following figure shows the Rhine basin with its catchment areas.
The watershed is the boundary between two catchment areas. This separation is formed by a higher area: a ridge or a plateau.
The watershed between the Rhine catchment area and the Danube catchment area at one point in the Black Forest in southern Germany is an area 100 metres wide, which is only a few metres higher.
The black arrow indicates the watershed. The two white arrows indicate the directions in which the precipitation will flow away.