10 Biggest Artificial Structures in Star Trek
Yes! They made it! I didn't expect it, but the iconic Borg cube still secured a place on this steadily growing list of oversized structures. We don't really know if all Borg cubes are the same size (those of TNG appear to be larger than on Voyager). But for the sake of simplicity I don't want to have an uncertain "TNG cube" on this list. So let us assume that a Borg cube generally has an internal volume of 28 cubic kilometers as mentioned in VOY: "Dark Frontier", which gives us a side length of a bit more than 3 kilometers. According to my estimation, this should beat a few other huge vessels that are longer but not cubic.
9Species 8472 Terrasphere
We have no good size estimation for this space station built by Species 8472 to train for the invasion of Earth, as seen in VOY: "In the Flesh". But we can see that a good portion of San Francisco and the bay is included, so the station measures a couple of kilometers in diameter if everything is to scale.
We can see this huge type of space station as Starbase 74 in TNG: "11001001", as Starbase 84 in TNG: "Phantasms", as Starbase 133 in TNG: "The Survivors" and as Lya Station Alpha in TNG: "Ensign Ro". I would want them to be the same (smaller) size as Earth Spacedock, but if we strictly go by the visual evidence from TNG with the larger Enterprise-D in place of the Enterprise(-A), we arrive at a diameter of some 7 kilometers and a height of roughly 10 kilometers. In any case, it is the biggest human-built structure in classic Trek.
7Delphic Expanse sphere
At least 78 spheres, each of which measured 19 kilometers in diameter, were responsible for the anomalies inside the Delphic Expanse. They were first encountered in ENT: "Anomaly" and destroyed in a chain reaction in ENT: "Zero Hour", upon which the Delphic Expanse vanished. Although the spheres are mostly empty, they have a place in this list because it is ordered by enclosed volume.
The Starbase Yorktown from the Kelvin Timeline movie "Star Trek Beyond" is the largest human-made object ever to appear in Star Trek. Depending on how we scale the Kelvin Enterprise, the lower limit for the station's diameter ranges from 12.5km to 25km. My apprehension is that the design size is more like 30km. But even if we go by the lowest possible size, the question must be allowed why the Federation would build such a massive station with millions of inhabitants in the middle of nowhere, and right next to the unexplored and dangerous Necro cloud.
When the probe passes by the Spacedock in "Star Trek IV", the Spacedock is roughly the same height as from the bottom of the probe's hull to about the middle of the rotating sphere. Considering the studio model was 4 times as long as high, it would make the Whale Probe some 12.5km in diameter and 50km in length.
There is some confusion about the size of V'ger from "Star Trek: The Motion Picture". In the original version of the movie, the phenomenon was said to be over 82 astronomic units in diameter, which was corrected to a more realistic 2 AU for the Director's Edition DVD. The size of the probe itself is not stated in the movie, but it was designed (and mentioned in the novelization) to measure 78 kilometers.
3Borg transwarp hub
A transwarp hub is a part of a network of transwarp corridors maintained by the Borg. There are six of these huge structures in the galaxy. Although we have no good size estimation, approaching Borg cubes are dwarfed by the hub. In VOY: "Endgame", USS Voyager used a transwarp hub to travel back to the Alpha Quadrant. The network was subsequently obliterated as it seems.
The Unicomplex from VOY: "Dark Frontier" is a vast spaceborne installation including the Central Nexus of the Queen and appears to be something like the capital city of the Borg. The structure measures at least several hundred kilometers in diameter, and even if this volume contains lots of empty space, it seems reasonable that it outranks a couple of the more compact structures. I also think that the Unicomplex is bigger than any of the five transwarp hubs.
The top rank is very obvious and totally indisputable because it must be larger than all other artificial structures of the known galaxy combined. The Dyson sphere from TNG: "Relics" measures 200 million km in diameter and encloses a volume of 4.19*10^24 km^3. The sphere thereby provides an inner surface of 125*10^15 km^2, which is 250*10^6 times the Earth's surface. Even though 99.999997% of the sphere are empty (at 1km thickness), its solid volume would still be 116,000 times larger than that of the Earth. In other words, building it should have consumed tens of thousands of planets... The Dyson sphere remains a mystery because a Q-like race able to build one would actually not need one and a less advanced civilization with the necessary knowledge would not give up their planets, everything that makes up their history.
Honorable mentions: The Voth Cityship (whose volume is a bit less than that of a Borg cube), the Caretaker Array, the ISS Charon and the "Wisp" ship from ENT: "The Crossing" narrowly didn't make this list. The hollowed out asteroid Yonada from TOS: "For the World is Hollow and I Have Touched the Sky" is not included because we don't know how large the useful volume is and because much of the rest is not artificial. I probably should include the Sphere from DIS season 2 as #2 or #3, although it does not seem to fit in any category. The octonary system Aia from Star Trek Picard may be artificially created and would top the list in terms of mass, but it is rather a mystical phenomenon than a work of engineering.
The structures by Species 10-C (hyperfield, Dyson rings) and Jurati's Borg ship from PIC: "The Star Gazer" are not included because I don't want to change this list every few months. Also, I don't think the hyperfield is a solid structure that would fit in here. The Borg ship from PIC: "The Last Generation" measures 25 kilometers in each direction and clearly deserves position #5.