Try a very weak solution of fabric conditioner and warm water (a few drops per litre of water). Apply using a small sponge (don’t overwet), then gently stroke the surface with a folded towel to try to lift and realign the pile.
Rinse and blot with kitchen paper, then blot with a terry towel (or use a cool hairdryer). Leave overnight.
Yellowing happens when a white garment is exposed to direct sunlight for a long time (the UV from the sunlight degrades the brightener in the fabric).
To reverse this, try rewashing in detergent containing optical brighteners or brightening agents, such as Ariel, within a full load using the recommended dose and at the hottest temperature on the label.
f you hang your washing on the line, keep the whites away from direct sunlight and take inside as soon as they’re dry.