Have we discovered or invented maths?
Relationships between things exist in the universe. Selecting and relating them to each other is the work of minds. But minds can also invent relationships that are not between outer things, but between thoughts. So the answer is both: people may discover whether the geometry of space is euclidean or not, but they may also discover there is a principle bundle over spacetime with such-and-such a group, not something the intrepid cosmo/astro-naut will ever encounter.