in what order one should study mathematics topics ? especially the mathematics needed to study physics and astronomy in detail ?
I am speaking about my experience in schools in the US. My opinion is that once you know basic mathematics, the next step is geometry followed by algebra, trigonometry, pre-calculus, then differential equations and calculus.
In the US, most high schools, for persons of age 14 to 18 offer classes in semesters or trimesters. There are two semesters and three trimesters in a school year. The geometry course takes one year. The algebra courses last two years. Trigonometry is one or two semesters. Pre-calculus takes one semester or a whole year. Calculus is high school is usually a one year course, if it is offered. Some schools do not offer differential equations or calculus so you have to wait for college for these courses. There are more advanced mathematics classes in college.
If you aspire to be a good amateur astronomer, learn as much mathematics as you can, if it is just a subject of great interest as a hobby. You can stop after trigonometry in this case, although any understanding of higher math is always useful. If you are looking to have either or both of these subjects as a profession, then obviously and you have to study the entire course along with more advanced and specialized types of mathematics.
Good luck with your studies. I hope you do well and someday make great discoveries. As always, call on me any time.