I would like to determine the center of this layer, when I look for the centroid I get the centroid of each separate shape but I want the centroid of the total layer.
You can achieve this using a virtual layer.
Go to the menu
Layer > Add Layer > Add/Edit Virtual Layer..., enter the following query and adjust for your layer name. You can then export the layer to persist its content.
To use the layer extent:
select st_centroid(extent(geometry)) from myLayer
To use the union of the polygons:
select st_centroid(ST_Union(geometry)) from myLayer
Use Menu Processing > Toolbox > Geometry by expression with this expression:
- for centroid of layer extent:
centroid (layer_property (@layer, 'extent'))
- for collected polygons:
centroid (collect ($geometry))