The word “worm” is a bit like “fish” in that it doesn’t actually refere to any specific group of animals, but a many different groups of animals that look alike. It doesn’t have defined taxonomic meaning.
But there are some insects that are called worms colloquially, like mealworms.