Confused

So kinda TMI but I got my period but the day before there was white stuff in my underwear, and doesn’t that mean you’re fertile? I read on here that you’re least fertile right before your period but now I’m confused. Does anyone know what’s happening?