Anyway here's an attempt: key for me was first getting a proper, deep understanding of how something works. At that point I would just spend time doing that alone, not caring about how, not caring about spending extra time on reading on tangential topics which wouldn't even be part of the exam. Just internalize the principle. Can't explain how that works, sorry.
After accomplishing that, I'd just read through the text once or twice more to pick up some details. Or in case of math for instance to go over some proof again to make sure the individual steps are also clear. Turned out that's then enough to almost completely memorize the whole thing. I.e., as opposed to just starting with the idea of memorizing everything through merely repetition.
I'd visualize the principle of why that meomrization works as a tree: the phase where the understanding is built is like a leafless tree in winter where it's not too hard to remember the location of the main branches. Once that is done, it's easier to 'hook' details onto that: the smaller branches attached to the bigger ones. And then the leaves onto that. Same tree, same shape, just more detail.
Whereas when I was younger studying would often basically be the counterpart: starting by memorizing the location of one single leaf, then another one, and so on. Often never seeing the shape of the whole tree in the end, and obviously also often forgetting the location of many leaves.