It's almost entirely glass, older panels have a variety of other materials, but new ones are about 3% silicon and 0.1-1% metals like Al, Cu and a tiny bit of Ag (which are all valuable enough to extract). And many countries have recycling laws like the WEEE. Commercialisation of circular economy concepts like making polysilicon panels from existing crushed mono or high purity poly panels is also happening.