The Stuckness of Andrew Wiles
One of the most famous examples of stuckness  both for maths as a whole and for a mathematician in particular  is Fermat’s Last Theorem, which states that there is no solution to $a^n + b^n = c^n$ for whole numbers $a$, $b$, $c$ and $n$ unless $n$ is 1 or 2. Pierre de Fermat wrote this down in a book in 1637, and noted “I have discovered a truly marvellous proof of this, which this margin is too narrow to contain.”
Any proof he had of this would indeed have been marvellous: despite the best efforts of many thousands of mathematicians, the ‘theorem’ remained unproved until the mid1990s.
After learning of a related breakthrough in 1986, Professor Andrew Wiles dedicated himself to solving the problem. He worked in almost total secrecy for close to seven years and finally announced an outline of his proof in a series of lectures at Cambridge in June 1993.
Unfortunately, there was a problem: Wiles had made a small, but significant error somewhere in the middle of his proof. He spent another year trying to put it right. By September 1994, he was ready to give up; he told his colleague, Richard Taylor, he could see no point in carrying on trying to fix it.
Wiles  one of the most brilliant mathematicians in history  was well and truly stuck. Properly stuck.
Taylor suggested giving keeping on until the end of the month. Wiles found the approach that worked on September 19th by cobbling together two different approaches, neither of which worked on their own.
After eight years of work for Wiles  and more than 350 years of the entire mathematical world being stuck  Fermat’s Last Theorem was, finally, proved.
Strategies for getting unstuck
So, how did Wiles get himself unstuck from his big sticking point? I can see several strategies that might work for anyone, from primary school students to professors.

He had a deadline. For Wiles, it was “let’s give it until the end of the month.” For you, it might be “If I’ve got no ideas in ten minutes, I’ll work on something else.” Having a fixed amount of time available can focus the mind remarkably.

He asked for help. After working alone for several years, he brought in a supportive colleague who suggested keeping on a little longer. (Notice that he didn’t ask Taylor for *the answer*, he asked for help. That’s important.)

He went back to failed attempts. His breakthrough came after he looked back at something he had dismissed as hopeless. Not all mistakes are like that, but there are often helpful pieces in otherwise incorrect work.
Tell me, dear readers, what are your best hacks for getting unstuck?