Yep, YA is an age demographic, not a genre. And while a YA novel is expected to have a junior high or high school aged protagonist, pov, perspective, emphasis, and voice are also important in determining whether it's actually YA, or simply an adult novel with a teenaged main character. It's particularly confusing, because the concept of books being narrowly focused on one age group and the approach to writing for teens has changed in recent years, especially in genre fiction. So some older books written in a more omniscient or "adult" feeling first person pov with teen (or even adult) protagonists are cross-shelved in YA by some bookstores and libraries.
And even among actual genres, there can be areas of crossover and confusion. And once you get into subgenres, it can get really sticky. Is a book heroic fantasy, or S&S? Is it epic or high? Military? Gunpowder? Manners? Can it be more than one of the above? How about none of the above? And how much emphasis does a romantic arc need before it becomes a "romantic fantasy" and gets a cover with a lot of pink on it, instead of a normal fantasy with a dark, broody dude/dudette in a cloak?
Fans sometimes get worked up over discussing where something falls too. Hard vs soft SF, as if it weren't a continuum. Debates over whether a lot of what's being marketed as UF these days is *really* PNR. Horror or paranormal or dark fantasy?
Gaaah.
It's not always about the elements present, since magic and supernatural beings can be present in fantasy, horror, paranormal, magical realism, or even historical novels sometimes. It's often down to the nature of the story and the emphasis on or role played by a given element in the story.