Invented but emergent from a very simple proposition that things can be counted. All mathematics depends on a set theory to describe what a number is, and from that the propositions of doing things with math like functions must follow those principles. You can of course invent a concept that didn't "naturally" exist, like a factorial or imaginary number (it's literally in the name that it isn't a "real" number and had to be invented, basically saying "you can't take the square root of a negative number, but what if you could?").>>2323
Newton and Leibniz were answering problems that already existed in mathematical proofs, and the need of a language to solve the problem of an infinitesimal. This isn't as automatic as you might think, if thinking about all the implications.
But no, there isn't a metaphysical hobgoblin "running the world on math" to determine how reality will unfold. That's always been nonsense in any serious view of reality. The first proposition, before you can even count something, is to acknowledge that such a thing exists, which is a whole other philosophical question. The set theory arises from noting that you can propose one thing, and another of the same thing, and consider them grouped together, and so on. It's a lot harder to say that multiples of some thing can't exist because reasons, than it is to accept that you can count things. It's actually an issue in some really primitive languages that don't have words for numbers, or only count so high, but it is not an insurmountable one. Native sense will tell us that there are many potential instances of some object, regardless of whether we have a numbering system or if we sense all of them in our space, however large we define it. The concept of "adding" or "multiplying" though is not written as an opcode in nature itself. It is an algorithm we carry out for our purposes in problem-solving, rather than the universe itself working out how many are in this group of things that we defined. The proposition of some stable system of matter, for example a ball comprised of so many atoms, is not contingent on a number of atoms simply comprising the ball, but some characteristics of the system as a whole. This is part of what led to a systems theory, to better describe these objects, particularly living objects.