Labeling - GeoServer 2.18.x User Manual
When is used the geometry is labelled at a single label point. For lines, this point lies at the middle of the visible portion of the line. For polygons, the point is the centroid of the visible portion of the polygon.
https://docs.geoserver.org/stable/en/user/styling/sld/reference/labeling.html