“Discovered vs invented” can perhaps be more usefully framed as “constrained by uncontrolled factors” vs “open to our choice”. Notably, once we’ve made certain choices, we’re constrained in our further results, in ways that aren’t always obvious from the choices themselves (consider the theory of chess). This gives rise to the “if-thenist” view, in which mathematics studies the “discovered”, constrained consequences of “invented”, freely chosen premises.
But this is a one-sided perspective — often, we instead start with the results we want and try to derive a system of premises which can produce those results. The systems we use constrain the results we can derive, but we’re free to choose which ones to derive, while the results we need constrain which systems we use, but we’re free to pick from within the sufficient systems. The processes going both ways (see Lakatos) shape our concepts and our understanding as they intertwine and evolve. Dialectically, one might even say.
One possible view – if I edge my perspective towards Platonism somewhat, this is where it goes – is that there’s a fixed, eternal, necessary, abstract mass of all possible structures, and we move freely through it, picking and choosing what we find useful or beautiful, but remaining within its bounds. The image in my mind is of a city carved into a glass mountain, or a drop of dye falling into a still lake…