There are two interpretations in the books of tafseer.
The first one is that the barrier is the dry land that separates rivers from the seas. This is clear and obvious and was mentioned by a lot of the scholars.
The second interpretation that there is an invisible barrier that separates the two waters from mixing immediately and that is why there are springs in the middle of the oceans and seas that divers while diving can drink sweet and pure water while being surrounded by salty water. Other scientists say that the barrier is an indication of the marine life that lives in sweet water and doesn’t live in the salty water as if there is barrier preventing it from going there, and Allah knows best