Yes. Apart from the butterfly, insects such as moths, fleas, and parasitic wasps also build cocoons to protect their eggs, following their stages.