How to share shaders among different materials In order to model a better quality Earth without distortion at the poles, I decided to use a cube, subdivide it 3 times and then to-sphere it. It works much better than a UV Sphere and than an Ico Sphere for the same reasons. All the faces are squares of similar size and if you use a cube projection, you will have no distortions and best texture quality.
As the material properties of the ocean and the continent are different, I used a Principled BSDF shader for each one and mixed using a texture of the ocean mask.

My problem is that as I need 6 images, one for each side of the cube, I duplicated the same material and just changed the texture. But if I work on the shader of the ocean, only one side is affected.  I want that all sides share the same ocean and continent shaders since only the texture is side dependent.

How can I do it?  Thank you in advance for any hint.
Textures are assigned by face, to make the ocean all one texture you would need to make one for the ocean, then make all ocean faces that material. If your contents were on one texture with the water areas alpha, then you could make one for the ocean, then overlay the contents over the ocean.
It may not be hard to edit your map image in a program to make an image with the contents and alpha water.