This question already has an answer here:

So from another question I asked about show raster layer over background, I learned how to duplicate a shapefile and use the inverted polygons tool to make the land the vector layer. I am now wondering how I can make a shapefile with the vector layer being the land and not the ocean? The shapefile I am using is "hydropolys.shp" so the current vector layer is the ocean. Any suggestions on how to create a vector layer of the land from the original shapefile and export it as its own shapefile, not exported as a duplicate?

marked as duplicate by artwork21, Erik, whyzar, ahmadhanb qgis Mar 5 at 14:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.