The cocoon always comes first then the larva
Egg Caterpillar Cocoon Butterfly
Plants came first as they make the that food the insects eat.
Caterpillars usually go into a cocoon during late-winter or late spring(March-may)
A caterpillar is the larval stage of a moth or butterfly, which eventually undergoes metamorphosis to transform into the adult insect. The caterpillar consumes plant material to grow and develop before forming a chrysalis or cocoon and emerging as a winged adult.
They don't weave a chrysalis. They shed their skin, and the chrysalis is what is left under their skin when they shed the final time. Some moth caterpillars weave a cocoon around themselves before shedding skin to form their pupa.
Silk is spun for the cocoon of the silkworm, an insect, before it can turn into a moth. It's vaguely similar to spider web. The silkworm is fed on mulberry leaves.
If you leave it there, and nothing else comes along and eats it, then eventually the bottom of the cocoon opens up and a moth or a butterfly struggles out. It sits in the air for a while drying out, then it flys away. If it's a moth, it lays eggs, never eats, and dies.
The process is called metamorphosis. Metamorphosis is a transformation in which an organism abruptly changes form. Butterflies are hatched from eggs and develop into caterpillars. Caterpillars transform into pupa (chrysalis) then emerge as a butterfly.
The earliest stage is being in the egg. Then comes the caterpillar stage.
Silk comes from the cocoon spun by the silk work. The cocoon is unwound and the silk is then processed for use by humans.
Metamorphosis.
The butterfly forms a cocoon, or "pupa" during the third stage (out of four, total) of it's life. The Caterpillar forms a protection shield called Pupa when it has finished growing. Most of the transformation takes place in side Pupa. This is also known as the "Chrysalis Stage".