infection
Sometimes the color of men’s sperm turns yellow due to urinary tract infection. This leads to a UTI called prostatitis caused by bacteria entering the prostate gland.
Also read: Men, remember that withholding sperm for long periods of time is harmful to health
Jaundice

The color of the semen of a person suffering from jaundice may be yellow. It occurs due to the breakdown of red blood cells.
Sexually Transmitted Diseases (STDs)
If a man is suffering from a sexually transmitted disease or STD, the color of his sperm may appear yellow.
Pyospermia

In men, this problem is caused by an increase in white blood cells. Due to this, the sperm is negatively affected. Due to this sometimes its color becomes yellow.
Also read: Men, does sleeping naked at night increase fertility?
Treat it like this

In case of any strange change in the body, consult your doctor for treatment. Moreover, if the cause is an infection or STD, it can be treated with antibiotics.