Actually "sea" is a countable and an uncountable noun (according to the Cambridge Dictionary).
The definition of a sea is almost the same as the defintion for an "ocean" (i.e. salty water / not fresh water).
So, in English we have an expression that uses the word "seas", e.g. I have sailed (travelled on a boat) on the seven seas (7 oceans).
If you live beside a sea (one of the many seas in the world) then you can say that you live beside the sea. I don't know which sea you live beside, so I would have to ask you "which sea do you live beside?"
a sea = one sea (any sea)
the sea = means I know the sea that are you referring to (talking about).