Organisms excrete DNA in their surroundings through metabolic waste, sloughed skin cells or gametes, and this genetic material is referred to as environmental DNA (eDNA).
source https://phys.org/news/2020-12-scientists-rare-chance-quantify-biodiversity.html