Phenomena are discovered.
Mathematics are invented to describe them.
Math works by starting with a set of axioms. These are chosen, usually but not necessarily such that they will describe some kind of physical reality. That is the part which you invent to describe phenomena, like the Peano axioms which describe quantities of countable things.
But then, you discover (and of course also prove) things that follow from these axioms. So a mathematician would find that if you take this set of axioms, then this statement is true. Is that an invention or discovery? I would call it a discovery, although different from a discovery of a natural phenomenon.