Why do I get electrostatic shock due to wool, but not due to cotton?

Triboelectric properties of cotton are irrelevant because it is more important that cotton is a fairly good conductor for discharging static electricity, it is not an insulator like wool. This can be easily demonstrated with an electroscope. A charged electroscope quickly (i.e., within a second) discharges through a piece of cotton. In contrast, the electroscope does not discharge through a piece of wool. Presumably wool is a good electric insulator because wool fibres have a waxy coating.