Weird thing in underwear

i keep finding this weird like thing in my underwear for the past 3 days. It’s feels like a bogey or jelly thing. I’m not very worried about what it is but I’m very curious. Should I go to the doctor about it or just leave it be. Also it’s not like staining my underwear or anything,it’s just there