Live plants or plastic plants? Gravel as substrate? What I did to get rid of them in my 20 gallon...Total tank breakdown. I set the fish up in a couple of buckets with heaters(after I cleaned the one off really well and had a spare for 2nd bucket.) Drained most of the water out of the tank. The regular decor, driftwood, and the HOB filter(trashed media) I gave a huge salt bath to. Regular non iodized table salt. I mean I dumped a bunch in. The live plants, anubias is all I had I believe so I won't vouch how others will do, I gave an alum bath. I left a bit of water in the tank with the gravel and dumped a bunch of salt in there. I left all of this for a few good hours.
Then I actually threw the gravel away and switched to sand, but rinsing really well would be OK to...Out of the tank though. I took the tank itself and gave it a very good scrubbing with a fingernail brush(did this with decor and driftwood too) and made sure I got all the snail eggs away though the baths would have killed them.
CAUTION: THIS WILL KILL ALL YOUR GOOD BACTERIA!!!! However, I was desperate, I needed to move the tank to redo the flooring where it was at anyway, and I wanted to switch to playsand as substrate. I also monitored everything once I put it in its temporary home and I did have small ammonia and nitrite spikes and did a few daily water changes as needed. After all this though, no more pond snails!!
But this was a huge amount of work. It's not for the faint of heart. If you don't put enough salt or alum in the baths or let stuff soak long enough, or clean the tank good enough, it won't work. You miss even one egg and they will be back.
And again, this will kill your good bacteria! So make sure you have test kits available before you do the so you will be prepared to test daily and do water changes as needed!