The Apollo sextant was used in Earth and lunar orbit, as well as while en route between Earth and the Moon. It played different roles in each of those contexts: in orbit around Earth or the Moon, the sextant could be used to compute the spacecraft’s altitude and position; whereas in transit between Earth and the Moon, it could be used to compute the spacecraft’s attitude (orientation), position, and velocity. A proper attitude during the flight to and from the Moon was critical for accurate course corrections and burns to reach the Moon and correctly insert the spacecraft into the desired lunar orbit. The device was used repeatedly throughout the Apollo program across many phases of the missions, up to and including re-entry.
Pretty impressive advanced technology! Also shows how the basics will never be outdated.