While I always hope that doesn't happen, it WILL happen eventually. It's inevitable unless you have like 100% amazing luck 24/7 LOL.
But when it does happen, don't cut the line instantly. First, always start by giving the rod quick jerks to get it out. Not big enough jerks to snap your rod though lol.
Second thing to do, tighten your drag, put both hands on the pole, pulling the pole with the line going completely straight through the eyelets. There should be no bend to the rod when doing this.
That will at least prevent you from littering wherever you're fishing with a lot of line. When you cut it, it can 1, waste a lot of line, and 2 be harmful to the ecosystem.