First, high school mathematics is really different from junior high school mathematics. It will be difficult to adapt at first, and it is normal to fail the exam at first.
Secondly, high school teachers will make the first exam artificially difficult, just to make you study hard after being hit and not be too proud.
I got full marks in mathematics in the senior high school entrance examination, but failed in the first monthly exam in high school. Later, I learned that teachers can also play this game. Don't worry, study hard and you'll be fine in the future.