The observatory was commissioned in 1675 by King Charles II, with the foundation stone being laid on 10 August. The site was chosen by Sir Christopher Wren. At that time the king also created the position of Astronomer Royal, to serve as the director of the observatory and to "apply himself with the most exact care and diligence to the rectifying of the tables of the motions of the heavens, and the places of the fixed stars, so as to find out the so much desired longitude of places for the perfecting of the art of navigation."
He appointed John Flamsteed as the first Astronomer Royal. The building was completed in the summer of 1676. The building was often called "Flamsteed House", in reference to its first occupant.
The scientific work of the observatory was relocated elsewhere in stages in the first half of the 20th century, and the Greenwich site is now maintained almost exclusively as a museum, although the AMAT telescope became operational for astronomical research in 2018.
According to wikipedia