Thanks for your query.Based on the facts that you have posted it appears that you had some pimple like swelling over your foreskin containing yellow fluid mostly a pus or sebum.
Mostly it looks like a infected sebaceous cyst
and the sac of the cyst is still there in the foreskin.
Please consult qualified General surgeon
for clinical assessment to confirm the diagnosis. You may need to get circumcised to resolve the problem permanently.