Well, Clams are some of the more difficult animals to keep in a home aquarium depending on the clam's method of energy input. Clams are either Photosynthetically nourished (a lot like plants), or they are filter feeders and eat things like phytoplankton or dead matter floating in the water. The later type (filter feeders) are EXTREMELY difficult to keep in small tank environments below say 100gallons. There just isn't enough "stuff" in the water for them to eat. Common filterfeeding clams available for sale in the hobby would be electric scallops.
The photosynthetic clams belong primarily to the Tridacnid genus and include T. derasa, T. crocea, T. maxima, and T. squamosa. They require a LOT of light as they are shallow water species in the wild, used to getting lots of light. Mercifully, a 20gal tank is pretty shallow so you have options in the lighting front, but you'd need at least 4 individually reflected T5 tubes, or a halide for sure to really keep one alive well. Maximas and Squamosas get way too big for a small tank like that. They can easily grow to a shell size of way over one foot. Derasas and Croceas stay significantly smaller, most in the 4-6" size.
Lastly remember that clams are a calcifying organism who will deplete levels of calcium, alkalinity, and magnesium from your water frequently to grow their shells. So to keep one longterm you will have to learn about that part of seawater chemistry and either perfom large frequent water tests, or dose those with additives to keep the levels high enough.
HTH