The Galactic Team has captured the three legendary guardian Pokémon of the lake, and your job is to rescue them. You will need to fly over Veilstone City and go directly to their headquarters. But the doors are closed. This is what you need to do to unlock the Veilstone Galactic headquarters building in Pokémon Brilliant Diamond and Shining Pearl.
You want to make sure you leave the building and do not enter right away. Instead, stay and speak to the Galactic Team grunt there. You will have a brief exchange with them and then they will run away from you. However, the Grunt will drop its key to the building, giving you access to the Galactic Equipment Warehouse. It is not the headquarters building, but it will get you where you need to go.
All you have to do now is head over to the Galactic Team warehouse where you stopped the Galactic Team from stealing Dawn or Lucas’s PokéDex. Head to the warehouse and use the door key. You will then be able to head to the Warehouse area and stay on the right side, and fight through the Galactic Team grunts.
You will have to move through an army of them, and there will be a room with yellow teleporters. Take the teleporter on the left and go that way. You will find the Galactic Key in the room beyond that of the Scientist that you can fight with.