Thank you!
The worm is actually a series of physics objects tied together like a chain by rope joints, it has no "real" animations, its movement it's just the result of applying forces to its different components.
Here's a link to an example chain/rope project made by MrMen (who is very active in the gdevelop forums and always has good advice) that helped me understand how to make one
https://mr-men.itch.io/linked-chain-demo
If you want to know how the actual wiggling of the worm works; when the LMB is clicked, I start a timer and when a certain interval has passed apply a force to the "butt" of the worm so it coils up a lil bit; then, I start another timer, which reaches the same interval and propels the worm head forward. Here's what that part looks like abstracted:

Thanks for asking! And if you need something more specific, don't hesitate to ask!