There are up to 7 types of silk-producing glands (and each silk is different). But not all spiders have all those glands.
Not all the spiders build cobwebs, but all of them have the ability to produce silk.
The construction of cobwebs is genetically codified, it is not by learning. In addition, it is done using the sense of touch. They don’t use their eyes at all!
It has been proven that the spider Araneus diadematus takes about 25 minutes to build an orbital cobweb (like the one in the image), using about 20 meters of silk, which weighs between 0.1-0.5 milligrams. These webs support spiders, which weigh an average of 500 mg… that is 1000 times more! Unbelievable, isn’t it?