The meaning of the word Cocoon is: the silky protective case spun by the larvae of some insects and moths that serves as a covering for their pupal stage
Examples:
They are like a pupa waiting in its cocoon for rebirth, ultimately becoming a butterfly.