It depends on how comfortable you are with the “issues” the box is all about. At least for me, all boxes so far required a bit of research; sometimes the user part is simple for me, but the root part involves something I don’t know; other times it’s exactly the opposite. I only remember doing one box from start to finish without researching a single thing- this mostly because I was already familiar with both user and root’s approach. Also knowing the tools you use is a good thing. Don’t use multiple tools that do the same thing- choose one, and master it.
When I’m stuck I usually give it a break, to give some time to think. About the learning part- my grandfather always tell me: “if you’re learning, you’re not wasting time”. The things you learn give you baggage to keep going forward, even to solve some problems you face later for the first time.
Don’t be hard on yourself. After all the enumeration, the lock is there, you only need to figure out which key to use. You are sure of one thing: at least on HTB, all boxes are somehow vulnerable.