Webb detects icy ingredients for making potential habitable worlds