For a primary school example, if you can solve basic arithmetic problems in service of a fun and challenging logic puzzle, that is more motivating than solving a page of arithmetic problems one after the other.
More generally, while mathematics certainly requires putting in time and actually doing the work of thinking a whole lot about a variety of hard things in the service of solving hard problems, very little of that is memorization per se.
> In the United States, the emphasis on understanding sometimes seems to have replaced rather than complemented older teaching methods that scientists are—and have been—telling us work with the brain’s natural process to learn complex subjects like math and science.
The older teaching method also sucked.
In my opinion, the single most important thing primary school math education should be teaching is how to attack and solve nontrivial word problems. Unfortunately we did not have any of that before, and still do not have any now. Cf. https://cs-web.bu.edu/faculty/gacs/toomandre-com-backup/trav...