The Great Andromeda Nebula, also known as the Andromeda Galaxy or Messier 31 (M31), is not actually a nebula but a spiral galaxy similar to our own Milky Way. It was one of the first objects observed by the Hubble Space Telescope, but it was not the first nebula discovered by Hubble.
The Great Andromeda Nebula was observed by Edwin Hubble in the 1920s, and his observations helped establish that it is a separate galaxy located outside of our Milky Way. However, Hubble did not measure the distance to the Andromeda Galaxy himself. That achievement was made by American astronomer Edwin Hubble (after whom the telescope was named), who used Cepheid variable stars as distance indicators to estimate its distance. In 1923, he determined that the Andromeda Galaxy is approximately 2.5 million light-years away from Earth.
It's worth noting that the Hubble Space Telescope, launched in 1990, has made numerous important observations of distant galaxies and other cosmic objects since its deployment.