The Poppy War
(The Poppy War #1)
by R.F. Kuang
It's like a martial arts movie. Most of the Harry Potter tropes are there but not all.
It's a lot rougher than Harry Potter, for example the protagonist's mentor tells her, "cut off your braids or someone will snatch you into an alley and sell you to a brothel." And there's opium.
I think it was written in China, but maybe not.
If you treat it like a martial arts movie and suspend your disbelief, I think you'll have a lot of fun, but if you're one of those people who nit pick every detail, you won't enjoy it.
In the second half of the book, the students are drafted and go off to war. None of the brutality is hidden. It reminded me a lot of the Japanese invasion of China back pre-WWII.