Except math can hypothetically model any consistent universe, not just our universe, which kind of undercuts the argument that it uses data that was mostly discovered, or that it's merely a model.
I think the most general view is that math is the study of structure, and some structures are real (in the sense that they exist in our universe), and some are not but we can still "discover" them by selective permutation or enumeration of axioms.