Reading this, my brain popped out this analogy:I would say that a Wizard already study all spells and cantrip from all levels.
But his understanding of magic, the shifting wave of the arcane flux make him only able to use some of these spells with a variable degree of efficiency.
A first level wizard know in theory what is a Wish, but it will take years before it can make his mind clear, sharp, to use it. And then maybe not at will. Stress, fatigue, external factor in the realm of arcane flux may make him unable to use it, but sometime he can.
As for cantrip it is the same, a caster has some preference, gift about some kind of magic. He can do some more easily with more efficiency.
In my interpretation a wizard don’t even know he has spell slots. Only the player do!
Doing math by hand, pencil and paper, gets faster and easier the more you do it. You learn your own shortcuts and tricks, and lean into the kind of math your brain works best with. [cantrip]
Doing math with a calculator is vastly easier [spell]. But if your calculator (ice knife) only has "plus" on it, you can't use it to do more than add. (okay, yes, there's some weird "new math" stuff that allows simulation of subtraction through addition...). Then you get a calculator that can subtract [2nd level spell?]. Then you get a calculator that can multiply. Then you get a calculator that can divide. Then you "upgrade" to a scientific calculator, which can do exponents and "1/x"; eventually you learn logs, reverse exponents (square roots, cube roots), as well as tangent and cosine, and so on.
Ice Knife (addition) still works fine on the scientific calculator - faster, in fact - but why burn those $30 lithium batteries when the old Ti-2 running on a 9-volt can do the job? Meanwhile, you've learned algebra, trig, geometry, and calculus along the way; you can do all those things "by hand" (cantrip), and you impress the heck out of the 5th graders when you do a quick trig problem in your head to solve basic math (4-dice with your cantrip)... but it ain't solving reverse internal ellipse areas under the curve, over time (all I remember about calculus, aka casting an actual high level spell with a high level slot).
But the scientific super-calculator only has so much juice, so mostly you don't waste it on addition and subtraction [limited spell slots]. And, at the end of the day, pencil and paper still work! [unlimited cantrips]