During my PhD I found I had to occasionally lock myself in a conference room with a bunch of papers and all the whiteboards to do a sort of "deep dive", in order to get everything into my head and push things forward. Things that were a bit rusty quickly came back after a little bit of effort.
At the end I'd emerge with a bunch of photos of whiteboards with clear intermediate steps, and then I'd write it up as a short report in LaTeX. Of course, as the report turned into a paper, I took out all the useful 'trivial' steps - which always feels a bit wrong. I think it's also useful at this stage to drop everything for a month or two and come back and see if you still understand what you wrote.
I think the "deep dive", putting prolonged effort in, and writing it up are all key aspects.
When I was studying, I went to two schools, one using semester system and one using quarter system.
With the semester system I had plenty of time to read the material and really explore the mathematics behind what I was learning. With the quarter system I was so busy running around and catching up in different classes that I never really had the time available to sit down and do that. It sucked. I think the quarter system kind of 'beat' the interest out of me because now it is hard to get back into that state of mind.
The quarter system is pretty non-optimal, I think. The college I went to ran on ten-week quarters, and even though it was normal to only take three courses, when each of those three is trying to jam an entire semester's worth of material into ten weeks, it's hard to even keep up with a surface level coverage of the material, much less dive deeply into it. It was pretty standard to have about 500 pages worth of assigned reading, plus extra research and writing, studying for exams, writing and debugging code. Fortunately, I was not an engineer or a hard-science major, so I didn't have the additional overhead of weekly lab work. When people took organic chemistry, it was a running joke that they were going on the "campus foreign-study program", since you'd see them about as often as you'd see friends that had gone off to Argentina or France for the term.
At the end I'd emerge with a bunch of photos of whiteboards with clear intermediate steps, and then I'd write it up as a short report in LaTeX. Of course, as the report turned into a paper, I took out all the useful 'trivial' steps - which always feels a bit wrong. I think it's also useful at this stage to drop everything for a month or two and come back and see if you still understand what you wrote.
I think the "deep dive", putting prolonged effort in, and writing it up are all key aspects.