Yoyo loaches grow too large and active for a 20gal, they prefer a soft snad substrate and plenty of hidng places made out of piles of smooth rocks and driftwood, and prefer tanks of cooler sub-tropical temps with strong water flow.
The problem with buying loaches purely to deal with snail problems is that many loaches need tanks with very clean substrate (preferably a soft sand substrate too) but tanks with snail population problems tend not to have very clean substrates because of all the masses of snails pooping 24/7 on it.
The best way to deal with really bad snail population problems is to firstly remove as many snails as you can from the tank and remove any snail eggs you can find by washing the substrate and decor in hot water and wiping the insides of the tank clean. Then when you have done that you need to help prevent the snails from getting any food, so make sure you are not over-feeding the fish and that the substrate is kept as clean as posible and that you don't have any plants in the tank with dying leaves and you don't have any algae in the tank etc- if you manage to remove the snails sources of food, then this will help a great deal in preventing them from breeding out of control.
If you still have some snails left after this, you can use some anti-snail meds, however do not use these if you have a lot of snails because if you kill all the snails off at once then you will have bad water quality problems on your hands from all the quickly decaying snails, some people have also reported anti-snail meds making their fish ill as well.
I used to have problems with MTS (malaysian trumpet snails) in the past, but i sorted the problem out by changing to a soft sand substrate (sand substrates trap a lot less waste in them than gravel ones, so are less likely to trap waste/food in them which the snails can eat and thrive off) and getting stronger and better filtration for the tank and also looking after the plants in the tank better.
I still have MTS in the tanks but they are there by my choice now days, i keep a small population of them partly because i don't mind a few of them in my tanks but also because the yoyo loaches enjoy eating them and i want to continue feeding the loaches the snails so thats why i ensure the snails future survival by always keeping a small population of them safe from the loaches
.