Silkworm ants are the pupae of silkworms that turn into cocoons after they spit out silk, and silkworm ants are the common name for the place where the cocoons are produced. The little silkworms that hatch out of the eggs are very ant-like, so they are also called ant-worms.
That is to say, in fact, it is the silkworm, more precisely, is the silkworm in the process of growth and development of a particular stage of the common name.