It sounds like science fiction. But we can now sample water to find the DNA of every species living there
Every living thing leaves traces in its environment. By sampling water or even air for this environmental DNA, we can know which species live where.