Thanos home and command center in the Universe.
The Mad Titan created the first Sancturay before he became the owner of the Cosmic Cube and used it to become a God. He pre-programmed the Sanctuary to retrieve and save him, which is what happens after Thanos is destitute from godhood by Captain Marvel.
Then he starts building other Space Ark which is why Sanctuary II or Sanctuary III can be found. He uses them in his plan to retrieve Death's love : Stellar genocide.
He arms Sanctuary II with the large synthetic gem holding the power of the six gems and thus creates a weapon capable of annihilating stars.
The Mad Titan also creates the Sanctuary III, and he leaves it unoccupied after he is killed by Warlock and turned into stone. His statue is left into the Sanctuary III and finds some believers who still inhabits the flagship.
Nebula, who claims to be Thanos' granddaughter, proclaims herself the leader. She is helped by Geatar and First Officer Styx. When Thanos is brought back to life by Death, he comes back to his ship and punishes Nebula by burning her alive. There he also kills Geatarand uses it as a decoy to fool the Silver Surfer. One crew member, Bo's'n Mantrax, hide the still living body of Nebula into a concealed part of the flagship and helps her recover.
Officer Styx informs Thanos that the Sanctuary III has been joined by an enormous fleet of misfits of the whole Universe.