stain removal is one of my latest interests, i got into it when i started selling clothes online but a lot of my other interests are also textile related. it starts with identifying the fiber type of the material that is stained (e.g. cotton, wool, silk, synthetic). then you identify the stain type. Then you select the cleaning agents for the stain type on the material, and spot test them on a non visible area of the garment to make sure they won't damage it before using them. Then you apply them to the stain and wait.
I found this video useful to understand the basic idea:
https://www.youtube.com/watch?v=OhsXqsUrzfMIf you prefer learning by reading:
https://site.extension.uga.edu/textiles/care/stain-removal/anon above is right that oxygen bleach is good for yellowing. give it time to work by soaking your fabric in it for at least a few hours or even overnight. fill it with hot water and keep it warm by putting the container with the clothes in it on a waterproof heating pad or putting some bubblewrap around it to insulate it. If you're not soaking the whole garment you can sandwich the treated area in saran wrap to keep it from drying out.
if the yellow is from sweat stains you can also try ammonia (do not mix with bleach, creates fatal chlorine gas) or vinegar.
https://site.extension.uga.edu/textiles/care/stain-removal/remove-stains-from-perspiration/an old toothbrush is a good tool to apply cleaning agents. but don't use it to scrub the stain, you'll just make a lighter area around it where the dye comes out and it will look even worse. apply it and then let it sit.
after washing, let the garment air dry. high heat in the dryer will set the stain, so if you air dry it it will be easier to try again if there is still stain left.