It is popular to be against rote-memorizing things (i.e. spending time to deliberately commit things exactly to memory) and in favour of something like learning "problem-solving"; I think this is a false dichotomy and memorization can help with more advanced skills.
Remembering things is faster than using reference materials
A common argument made against reliance on external tools for cognition like calculators is that you "won't always have them". Obviously in today's world of ubiquitous portable computers this is mostly wrong in noncontrived situations, but a better reason is that they're not tightly integrated enough; access is very slow. Even with the best search tools it's generally faster to recall things (assuming they're not extremely long and you remember them well) than to retrieve and consult relevant notes. This can be a significant bottleneck: imagine how much slower mental arithmetic would be if you had to look up the results of single-digit operations each time. Even if the time cost isn't that large, it can still be problematic via removing you from "flow".
Notes tools aren't good at making connections
Despite recent work in this area (graph-structured note-taking applications/Zettelkasten and LLM-based semantic search), modern note tools will generally only surface related ideas if they use identical or similar wording, while humans' "general intelligence" can relate structurally similar or conceptually similar things as well. I expect this to improve in the future, but for now, if you want to be able to do that you have to retain at least a rough overview in your brain (knowing the exact wording of whatever you've read isn't that valuable). Being able to effectively "problem-solve" requires making this kind of connection a lot in order to relate new patterns to ones you've previously seen and can understand.
Efficient spaced repetition makes the time cost small
A naïve flashcard system which shows you all the things you need to remember every day would be a terrible timesink and probably not worth using. Fortunately, this is not at all necessary: research has elicited a decent model of how we remember and forget things, and it turns out that the time you retain a memory for increases each time you see it again. This insight has been incorporated into "spaced repetition systems" like Anki, which only show you things frequently enough to keep them memorized, meaning that you can learn a fact with only a few minutes of lifetime time investment.