Such a good question!
Average is hard to say, but we can talk about “typical.”
Novels are typically 50,000-120,000 words in length. Most first-time novels are 50,000-80,000 words
Interestingly, even in genres or series where the books are on the longer side, most author’s first books are shorter. Harry Potter is a good example. The first book is around 77,000 words, but a few of the books later in the series are closer to 200,000 words.
As another example, Stephen King routinely writes very long books now, but his first published book, Carrie, was about 60,000 words.
This is because shorter books carry less financial risk for a publisher (also true for a self-publisher!). Longer books cost more to edit, design, print, ship, etc. Once an author has proven they can sell, a publisher is willing to take a bigger risk on longer books.
Within that general range, genre has a lot of influence over length as well. Fantasy books tend to be very long, often with titles approaching 200,000 words or beyond. Romance and mysteries, as an example, tend to be on the shorter side, in the 60,000-80,000 range.
For anyone writing their first book, I recommend shooting for that 60,000 word mark, and then definitely staying in the 50,000-80,000 word window.