The first one is obvious, Ringworld by Larry Niven; a gigantic ring rotating around a white dwarf star. The second one is the Citadel from the Mass Effect series of video games, and that construction was made by a race ancient and extinct compared to the ones that occupy it, including humans.
That’s because the Ringworld is unstable! The Ringworld is unstable! ;’)
I would rather have a Dyson Swarm of O’Neil Type Space colonies, protects you from a single point of failure....
Of course if ZPE was ever easily realized then gathering energy from stars would be passe, and you could have giant colonies built inthe interstellar medium and ort clouds that would be “silent running” type colonies as added protection against any alien attackers...