I'm in last middle school year and want to learn High School maths in depth — I want to grasp the behind the scenes and learn proofs. What are good books to self study HS maths this way? In what order should I study?
Much of high-school mathematics consists of learning technical prerequisites to calculus. To most students, this creates a false impression of what mathematics is: they come to think it consists of learning algorithms to be applied mechanically. One can avoid that while remaining within the curriculum provided one is careful to understand the reasoning involved. There are also books for high-school students that give a more realistic picture of mathematics, many of them found in good high-school libraries, some published by the Mathematical Association of America and some by others. One that I've liked since I discovered it when I was 15 is C. Stanely Ogilvy's Excursions in Geometry.
I add to the answer of Chris a very nice book in English language. I have discovered this morning that some examples are taken from my textbook in italian language.
The name of the book it is the necklace of JAMES STEWART
Here there is a preview of Algebra: https://www.stewartcalculus.com/data/CALCULUS_8E_ET/upfiles/6et_reviewofalgebra.pdf