Exo by fonda lee
The setting is about 100 years into the future, after Earth has been conquered by an alien race called the zhree. Instead of doing this Lee demonstrates her worldbuilding logic continuously in the story, and in fact it helps shape the story. It’s a tough order, and some YA authors choose not to do it, using robots, starships, and aliens as the Star Wars universe uses them… as elements of fantasy. That is, an out-there premise is given and the author extrapolates from it, showing us the effects it has on science, the environment, human society, and human relationships, all of which are worked seamlessly into the story so the panty lines of extrapolation do not show. Of all the YA science fiction I’ve read so far (and keep in mind it hasn’t been a lot) Fonda Lee’s Exo is the only one I’d call true SF.