Unless you want to!
"I'm just going to check you quick."
"Just a quick stretch and sweep."
These procedures come by many names. But they're all basically the same thing: at a prenatal appointment in your last weeks of pregnancy your medical provider sticks his or her fingers in your vagina and feels around, presumably to tell how ripe/open/thin your cervix is. Sometimes they do more (with or without your consent) to manually stretch out your cervix (sometimes called a "stretch and sweep" or "membrane sweep" or some variation thereof).
Here's the thing: this procedure prior to labor provides zero useable knowledge. Literally zero. (Because it can change AT ANY MOMENT).
And... it comes with risks. Most notably, a risk of infection to you or your baby, a risk of unplanned breaking of waters (premature rupture of membranes or PROM), uterine irritability (lots of useless contractions or braxton hicks), and just plain old disappointment (because, honestly, no matter what info your doctor gives you it's never good enough when you're just ready for your baby to be in your arms).
So.... pregnant people... just stop letting people stick their fingers in your vagina without a solid reason.
Solid reason = your pleasure. Or knowing that some useable knowledge will come of it.
Unfortunately, as much as we'd all love to have a crystal ball, no one knows when labor will start, or how long it will last. Even your doctor (or midwife). Even if they have their fingers in your vagina.
Anyway, as always, I recommend you do with this information whatever YOU want. If you enjoy cervical exams, if you believe the snapshot of current information will relieve your anxiety, then by all means... go for it! Truly. No judgement.
But for those who find it invasive or uncomfortable... just fucking say no.