Harry Potter became a billion dollar business after the movies and toys and so on were created - again, it takes waayyy more people than one to actually produce this amount of money. The initial idea that Rowling herself came up with is of course a significant part of that - but still only a small part of it, in the grand scheme of things.
It's also important to note that Harry Potter making billions of dollars also prevented any other similar books or ideas from making any large profits. The entertainment industry is very much a winner takes all industry. HP didn't hugely grow the children's entertainment market, it just outcompeted other works. This is extremely important to understand, because it directly implies that a huge part of the value is simply that media execs decided to bet big on HP instead of trying out many other possible properties. The money would have happened either way, more or less the same - they just would have been distributed to one or many other authors instead, if JK Rowling hadn't hit it out of the park. People would have bought a roughly similar amount of books for their children to read, a roughly similar amount of toys, would have taken them to a roughly similar amount of movies.