Well yes and no. A lot of mathematics found its roots in trying to model the real world, however I would then argue that the truths we prove about these models are truly discoveries. And with these discoveries we can often generalize the setting to more abstract formulations, independent of the physical reality.
I think that this can be seen in the fact that sometimes mathematicians and especially physicists can reason about objects that they are not sure about what the right definition should be. Many mathematicians reasoned about continuous functions long before we had a concrete definition of them. But when Cauchy introduced the definition and Weierstrass proved it is equivalent to preserving limits (which was the intuition at the time), we had not truly discovered something new and mathematical.
This whole idea was then generalized to topology when it was shown that pre images of continuous functions preserve the "openess" of sets, i.e. we realized that no concept of distance was not needed to describe continuity, which is very surprising.
I think that this can be seen in the fact that sometimes mathematicians and especially physicists can reason about objects that they are not sure about what the right definition should be. Many mathematicians reasoned about continuous functions long before we had a concrete definition of them. But when Cauchy introduced the definition and Weierstrass proved it is equivalent to preserving limits (which was the intuition at the time), we had not truly discovered something new and mathematical.
This whole idea was then generalized to topology when it was shown that pre images of continuous functions preserve the "openess" of sets, i.e. we realized that no concept of distance was not needed to describe continuity, which is very surprising.