Shrinkage is a fiber-and-process interaction
Heat is a major factor, but it is not the only one. Moisture and mechanical action can allow fibers, yarns and fabric structures to relax or tighten from the dimensions set during manufacturing. That is why two garments exposed to the same washer can change differently.
Cotton and wool need different mental models
Cotton can shrink when heat and agitation allow the textile to relax, particularly when it has not been fully preshrunk. Wool can shrink and felt through moisture, heat and friction. Blends and finishes can reduce or change those responses.
The dryer can amplify risk
High dryer heat and overdrying increase exposure to a common shrink trigger. Lower heat, air drying or flat drying can be more conservative choices when the garment label allows them.
Prevention is easier than recovery
Read the label, use a suitable temperature and cycle, and avoid unnecessary heat. If an item has already shrunk, recovery may be partial or impossible depending on the fabric and construction.
Garment care labels, appliance manuals and laundry-product directions can be more specific than a general guide. Use them when they set a tighter limit.