Fantasy was already established as a genre by the time the Harry Potter books came out, and Rowling did not have to create a market for her type of work. She had to compete with others writing in that genre, which is a different task. The conventions of use of magic even by children, of schools for wizards, and of inherited magical ability were already in place, with little need for explanation, simply elaboration.
Yet she also used the ready-made conventions of another genre, the English School Story. These revolved around boarding schools (single-sex originally), with friendships, mischief, nighttime explorations, and mysterious secrets figuring prominently. Stories about groups of American children up through adolescence tended to place them as moving freely about towns or villages instead. Summer camp stories were usually the closest we got to that here, especially as those tended to be single sex, or at least strongly separated even if under the same banner.
I read only one of the HP books. I liked it well enough, but the magic was too ubiquitous for me. In Tolkien and Lewis various magics are less common and less distributed. In LOTR especially much that is called "magic" is actually something natural about a group that is not shared with other creatures and not easily explained, such as better vision in the dark, longer life, or silent movement. For the learned or developed magic, many who are able are reluctant to use it, notably Gandalf. For human beings to use it usually goes sour. Too much magic seems a bit gimcrack to me, though I get that this built up gradually in the genre long before Rowling came along, so that she was not an especial outlier. It may be why I tired of the genre as it continued, with Xanth being the final straw.
Still, even from the one volume I did read, once I heard the explanation that it was also a school story I was able to fit that back on easily. It is another layer of enjoyment for those who already liked them.