Unfortunately the duplicate in mathematics hasn't got good answers, so I will give it a try.
The answer is: Mu.
It means that the question must be unasked or that neither "yes" nor "no" is right or wrong.
Mathematics is examining the properties of consistent mental models or structures. It started with numbers and geometric figures and it was used for applications (counting, area calculation) from the beginning. It would not be completely wrong to name it "number philosophy" although it has expanded greatly and examines now a innumer...a very great number of concepts.
An example to show the difference to science: Let's say a scientist would try to prove the Pythagorean theoreom without mathematics. He would find out
that if we draw squares on the side of a right-angled triangle, the smaller ones look like they have the same area as the big one. He would experiment with it and while they really look very similar, he will never achieve an equal result. The cuts are not completely straight, the material bends, the lines have always some extent. Even if he succeeds in determining that for all tested right triangles the values are mostly equal, he/she can never be sure that it will stay so.
A mathematician can prove that the sides are exactly equal. This is possible because s/he does not use real-world modelling and is therefore not limited by their applications. But while it is not the real-world, it still allows discoveries. It is not self-evident that right triangles have this interesting property.
Mathematics is a necessary part of science because it is a building block for any precise models we need to refine the work. Physical values are models by numbers (or matrices/tensors) and a concept of a dimension. In higher physics countle...a big number of mathematical models are used.
For the reason that mathematicians and other scientists are sharing many mental similarities (curiosity, challenging matters of course and relishing hard, but interesting problems) their faculties are often joined together which results in the STEM field.
So mathematics is "sciency".
But...it is not really a science because it is more fundamental: It does not require knowledge or experience from other scientific fields. If a mathematician travels back in time 20 000 years (the humans were on a comparable intelligence level as today) he would be able to teach a bright kid modern mathematics which is impossible for modern science because there is no infrastructure to replicate experiments. Mathematics also has no room for error or reevaluation. Once the axioms are set (yes, if the axioms change, the result can change), a result is valid for all times.
Mathematics is also used massively outside science including the humanities.
So mathematics is not a science.