10 Largest Megastructures In Star Trek
4. The Dyson Sphere
In the Next Gen episode Relics, the Enterprise-D encountered an unfathomably huge structure known as a Dyson sphere. Unlike Dyson Rings, this sphere completely surrounded a G-type star, allowing the star's entire energy output to be harnessed.
With a diametre roughly the size of Earth's orbit, the internal surface of the sphere would always be the perfect temperature, and with more livable space than every world in the Federation combined, it could house untold billions of inhabitants.
The technology needed to construct such a sphere would be godlike by Starfleet standards. Just gathering the materials would require consuming millions of planets. The sphere was uninhabited when the Enterprise found it, so its origin has remained largely a mystery, but the fourth season of Discovery shed some light on how gargantuan structures like this could be built using devices like the Dark Matter Anomaly (or DMA).
In Discovery, Species 10-C used the DMA to harvest materials from planets for use in their own megastructures, destroying worlds like Kwejian in the process. Still, it's unknown whether this particular sphere was constructed by 10-C or some other highly advanced society.