It is almost impossible to define or categorize what constitues a “humor book” versus a “book that is funny.” Nonetheless, I think it is important to be able to point to books that have an overarching comic, comedic, or humorous plot. These are the books I will label as part of the “humor” genre, even though humor is a lot more complicated and broad than that.
According to arbitrary rules of comedy that comedians/comic writers break all the time, a comic plot is one that continues to escalate, or “raise the stakes,” until it is fundamentally resolved in some manner, and ends with the general success of the protagonist, often (but not necessarily) romantically. I’m personally going to say that a young adult humor book is one in which some comedic device, whether it’s a classic trope like the ol’ mistaken identity trick, or something more complex, like a plot that relies a lot on situational irony, takes up most of the plot. The plot can still include romance, fantastical or science fiction elements, tragedy, etc.