Boy! I’m not sure I can offer any help here, because I LIKE that they’re fluid in this way. It’s good for the genres that there is a ton of variety–that you can find literary fiction like The Left Hand of Darkness alongside adventure fiction like Leviathan Wakes all in the same genre. It increases the chance that people will happen across something they’d never have otherwise tried, but will come to love.
But here’s a quick stab at it: All of these are part of something we call in English “Speculative Fiction.” Fantasy is the genre that, in general, explores human experience through stories that are impossible according to our current understanding of physics. Science Fiction is the genre that tries to explore human experience through extrapolation into the future of current social structures and scientific understnading. Young Adult literature can be either speculative or not, and is the genre that explores its themes primarily through the lens of a young protagonist, facing traditional challenges of maturation, such as transitioning to an adult, finding where they fit in, and these sorts of themes.
It gets sticky when you have something like Star Wars which has a Young Adult protagonist, but is not marketed as Young Adult, takes place in a setting with starships but isn’t trying to actually extrapolate from our current setting, and is more fantasy in its themes. For that, you just get a shrug from me, and a comment of, “Well, that’s why the genres are just guidelines to start from.”
Current trends in YA favor fast pacing, a small–yet very strongly voiced–set of protagonists, and a quick beginning without wasted time. So there are aspects of it that are very different from writing, say, the Stormlight Archive. (Large cast, more epic pacing, and a difficult barrier to entry.)
That said, it’s important to understand as a writer the difference between market/writing trends and the core principles that make a story function. These are relatively unchanging, and have been such through human experience. In that regard, it’s no different all–but on the surface, it can be (metaphorically) the difference between Vivaldi and Lady GaGa.