Theory:

Locomotion in earthworm:
Earthworm is an invertebrate found in the gardens and fields. Its body is made up of many rings joined end to end. These organisms lack bones and contain muscles. These muscles are involved with the extension that shorten the body.
At the time of movement, the earthworm first extends the front part of the body. During this, the behind portion of the worm remains fixed to the ground. Then it does the vice versa where it fixes the front end and releases the back end. It pulls the back end forward by shortening the body. By this, it moves forward by a small distance.
The earthworm moves through the soil by repeating these expansions and contractions. Its body also secretes a slimy substance to help the movement.
The earthworms fixes itself to the ground with the help of bristles that provide them grip as shown in the image. The bristles are tiny hair-like structures that are found projecting out under the body of the earthworm. These are connected with muscles. 
download.png
Important!
The earthworm finds it food through its way through the soil. It excretes the undigested part of the food that it consumes within the soil itself. This activity of the earthworms increases the fertility of the soil for the cultivation of plants.
Locomotion in snail:
Snail is an organism that is generally found in the gardens and fields. It carries a rounded structure known as the shell on its back.
The outer skeleton of the snails that are composed of calcium but not of bones is known as the shell.
snail-4368154_960_720.jpg
The shell is a single unit that is not involved in movement and locomotion. Its function is to protect the organism during extreme conditions; and hence, it is dragged along by the snail.
The shell has an opening from which the head and foot of the snail comes out during locomotion. The foot appears as a thick structure as it is made up of strong muscles.
Important!
As the snail has a heavy foot and thick shell that has to be dragged along, it is a very slow-moving creature when compared to the earthworm.
Reference:
shorturl.at/flATZ
https://pixabay.com/photos/snail-shell-mollusk-probe-mucus-4368154/