I believe Chandrayaan 1 has detected water, but not sure if it was the first one to do so
However, the first direct evidence of water vapor near the Moon was obtained by the Apollo 14 in 1971 [0]. A series of bursts of water vapor ions were observed by the instrument mass spectrometer at the lunar surface near the Apollo 14 landing site.
[0]: https://www.planetary.org/articles/water-on-the-moon-guide