ST_Polygonize
Processing
ST_Polygonize (Python)
Generates a GeometryCollection composed of polygons that are formed from the linework of a set of input geometries.
Generates a GeometryCollection composed of polygons that are formed from the linework of a set of input geometries.
SQL reference:

