This is a false dichotomy. The two options you suggest are the central positions of Platonism and Formalism as approaches to math. But there are others. I would like to inject my favorite one of those at some length. (Pardon the repetitiveness and my occasionally running on. I feel the ideas are subtle and need to be explained multiple ways.)
From an Intuitionist/Constructivist point of view, mathematics is part of the structure of the human mind. As such it is evolved and shaped by the universe, not just made of nothing as the Formalist might suggest, but neither shaped perfectly to the universe, as the Platonist might expect.
From this perspective, mathematics studies the deepest aspects of human psychology, the primitive intuitions that allow us to make a combined whole out of our perceptual mechanisms and our linguistic structures. The sorts of things that all perception and all language must obey, whatever more situational adaptations enter into the mix at a higher level, or whatever compromises happen in the name of efficiency. Things like the nature of succession that allows us to represent time in language, or disjunction, conjunction and implication as natural ways of combining expectations without having to do any coping of the expectations themselves to make them fit together.
This encourages us to trust mathematics to a considerable degree, but not to be overwhelmed with surprise when we find that it contains paradoxes. We should expect honest paradoxes, places where two competing intuitions evolved for to different purposes compete and do not agree. Russel's paradox is not just a language trick. The paradoxes of measure like the Banach-Tarski theorem are not indicators that 'something is wrong' with either the axiom of choice or the notion of measurement. Natural needs do not have to fit together. Sometimes there are basic problems nature has not yet addressed.
It also explains the 'unexpected' success of math in our science. Something that is largely responsible for our survival as a species, perhaps so deeply embedded that we cannot really believe its most basic causes are false, has been challenged a great deal, and has successfully saved us over and over again. And we are still here. So none of its errors can be too near the surface, or can really matter all that much when they are applied to important things.
Then the ultimate gaps and paradoxes are problems that arise from intuitions that do not come together naturally and have not been simultaneously important often enough to have evolutionary forces apply to them and shape them into a common whole. We have never needed to know how an overarching logical system modeling human arguments in their most abstract forms works, and we should not be shocked if it just doesn't. That does not make the system itself any less real, or keep it from helping us negotiate contracts and decide which theories of causation are most likely when we encounter arguments about the relationships people build.