The short answer
Snails usually die from one of three things: copper (toxic to all invertebrates), an un-cycled or unstable tank (ammonia and nitrite poisoning), or low calcium (which weakens and erodes their shells). Sudden deaths point to copper or a water-quality crash; slow decline with a pitted, thinning shell points to soft, calcium-poor water. Identify which and the fix is usually straightforward.
Copper and other toxins
Snails are extremely sensitive to copper, even in tiny amounts. It hides in some fish medications (especially ich and parasite treatments), certain plant fertilisers, and occasionally old copper plumbing. If snails died soon after you dosed something, suspect copper first. Only ever use invert-safe products, and always dechlorinate tap water β see is tap water safe for aquarium fish.
An un-cycled or unstable tank
Like shrimp, snails suffer in a tank that isnβt fully cycled. Any trace of ammonia or nitrite stresses and kills them. Never add snails to a brand-new tank β cycle it first (how to cycle an aquarium) and confirm ammonia and nitrite read zero with a test kit. Big, sudden swings in temperature or pH are also hard on them.
Low calcium and soft water
Snails build their shells from calcium, so soft, low-mineral water leaves shells pitted, thin and cracked β and eventually the snail dies. If your water is very soft, raise hardness (see how do I make aquarium water harder) or add a cuttlebone or a calcium-rich supplement. Keeping nerites or mystery snails in stable, moderately hard water solves most shell problems.