Brief Answer:
Probably related to infection.
Detailed Answer:
Hi,
Greetings
Yellow vaginal discharge could be due to an infection. Even the spotting after periods could also be due to infection until unless a gyneac check up is done including an ultrasound scan.
Feel free to ask your doubts with more details like your age, weight and height , married having children ,associated with any other medical diseases etc.
If there is infection you and your partner has to take treatment together and avoid sex for one week.
Always a speculum examination by a gynecologist would be better to identify the cause and permanent eradication of infection.
Regards