RAW, Knock should not be able to open all puzzle boxes. For ones that can be considered "locked" and can be opened by Knock, I would rule a single casting is sufficient.
RAW, I would argue that the Knock spell only opens something that is
held shut by a mundane lock or that is stuck or barred
held shut with arcane lock
The first paragraph of the spell describes which objects can be targeted. It does not say anything about what kinds of "means that prevent access" can actually be bypassed by the spell, only what the criteria are for targeting.
The second paragraph describes what action the spell takes against the "means", and this is very specific. I would rule that this spell does only what it says, no more. If a puzzle box has something that can be described as a locking mechanism, then I would allow the spell to open it. If however the box is not locked in any way, just cleverly crafted so that when you pull it a certain way, it falls to pieces, was it "locked"? Did you "open" it? Or did you discover a secret compartment in the middle of a block of wood? There's room for interpretation here.
Try working through these test cases: Would the Knock spell
- open a secret door that has a hidden latch that you can't find?
- open an ordinary door that has a door knob that you just didn't bother to turn? Is that a "mundane or magical means that prevents access"? If the door knob doesn't "prevent access", then how is a secret catch different, except that you don't know how to use it. Seems like that would require a divination spell, rather than a transmutation one...
For the sake of consistency, ease of implementation, and frankly my own sanity, I would rule that secret catches and similar mechanisms are not technically "locks" for the purposes of the Knock spell. They are simply hidden doorknobs. Some types of puzzle boxes would fall into this group, and those would have to be worked by other methods: ability, skill, or tool proficiency checks (maybe woodcarver's tools, or carpenter's tools, or Dexterity(Deception), or a straight-up Int check), research, divination spells, etc.
For the second part of the question, how many castings are required, again for consistency and to avoid absurdity, I would treat each movement of a puzzle box as a tumbler of a complex lock, and open them all with a single Knock spell. If knock doesn't open it on the first try, then you'll need to try something else.
Consider this: the spell doesn't tell you how many locks there are. How many Knock spells are you honestly going to throw at the ornately carved block of wood before you decide it's not really a box? Do you want all such scenarios to cause a marathon Knock-fest? This is what I mean when I talk about avoiding absurdity.
P.S. Try putting yourself in your DM's shoes for a minute. Making a ruling isn't just about rounding up some English majors and lawyers and dissecting the text of the spell's rule. The real compelling question from your DM's perspective here is: do they want puzzle boxes to be an interesting part of your game?
If they do, but any puzzle box can simply be popped open with a 2nd level spell, or even a series of 2nd level spells, then it will likely cease to be an interesting challenge element once the players have access to those spells, either because of their level or their wealth, which would be fairly early in most campaigns.
That may be fine for some campaigns, after all, higher level characters are supposed to make short work of things that are difficult or impossible for lesser mortals. It's part of the hero shtick.
But if you're a fan of these types of things and want them to remain a viable challenge even in the face of a spell like Knock, you might rule that the spell doesn't cover all of them. Which IMHO is fine as long as there are ways to figure out how to open the more problematic ones, and resources that can be gained to discover those ways. Or in the case of certain pivotal campaign McGuffins, a particular piece of information or circumstance along the heroes path that reveals the trick, just when having access to the box's contents would be the most interesting.