40,000 words isn't a novella, it's a short novel. The Bridges of Madison County was only 33,000 words, but it hit the top of the bestseller list three times, once in hardcover, once in paperback, and again when the movie came out.
But length is always a choice. You can make any story as short or as long as you want to make it. One of the most common forms of self-sabotage is not writing to proper length.
Having said this, a 40,000 word YA novel is not impossible to sell, if it's good enough. Very few are.
But the first step is not where and how to sell anything. The first step is actually writing something good enough to sell anywhere. When you have a completed first novel, one that's so good it stands out in a slush pile like a diamond in a pile of coal, one that can, if it must, stand alone, just as the first Harry Potter book did, and one that is of publishable length, which is always a decision the writer makes, then, and only then, do you even think about where and how to sell it.