People can't exploit Magic
The problem is in your first paragraph:
All spells are contracts with magic so when anyone makes a new spell it works because magic looked at what they were trying to do and decided to make a contract out of it
This means that Magic will automagically know what you are up to. If your intentions are to exploit Magic I am sure that Magic will make sure that it doesn't accept this contract.
You took away the possibility to exploit Magic and have written yourself into a corner if that's your final say on this matter - there is no way to work around this. You need some Kryptonite - something that is totally unreasonable, but will make your totally overpowered power less powerful and exploitable.
There is no need to talk about ways to exploit Magic or what specific goals you have in mind for exploiting Magic - it's simply impossible. The following are simple general exploitation attemps that work with normal flawed systems where I try to show you usual ways to exploit with the goal of being the most powerful human/ elf/ ... in the world. Your specific setting would need to take these ideas and adapt them to the character and style you are creating.
Let's look at some ways to exploit a more harmless version of Magic - magic
The difference between Magic and magic is that Magic can detect basically anything, especially your motivations and even your motivations if you send your underlings to interact with Magic, while magic is only able to judge whether a contract is new, meaning that the input has not been used before, or not - new contracts will always be accepted. (This idea can also be adapted to outputs.)
Brainwash your followers through non-magical means
This allows a mage to manipulate a human through old-fashioned brainwashing. Evil Mage manipulates Unsuspecting Follower to create spells with common inputs, such as common items. Your description shows that the items are the important parts in this sort of magic, which means that using all commonly available household items will make sure that no new wanna-be mage will be able to do something meaningful with magic. Evil Mage will simply say that Unsuspecting Follower has to make as many contracts as possible, creating an endless arsenal of basically-useless spells.
What good is magic if all you can do is cast Light in a 5-foot radius with everything you use...? But, fear not small citizen, for Evil Mage knows the secrets of powerful magic (for Evil Mage has many Unsuspecting Followers and is now one of the only people who know how to make useful contracts with magic). Just offer up all of your savings and Evil Mage will make sure that your wife/ son/ ... survives the current disease (which technically does not directly kill people, especially because the intent was to later heal them to show the power of magic - which means it will surely be viable).
This requires that every instance of a new contract is the list of inputs - not the combination of inputs and outputs. If it's the combination scratch this idea and move on to more Kryptonite.
See if Magic wants to play a game
This idea works on the idea that Magic is curious. Your question makes it look like Magic is interested in seeing how people will use Magic - and as an entity that's likely immortal, invincible and totally overpowered it will likely have developed some form of hybris. It can change the fabric of reality after all, so there is not really something that can be done against it and it can simply play a bit with these not-so-hairy-apes and their funny ideas of inputs.
Make a game that involves a specific way to start magic that is only knows to a few people and involves things normal people won't do
Make a contract that allows you to switch Magic on and off - meaning that nobody else can possibly use Magic when you don't want to. This probably won't work at first "since it likes to be used", but Evil Mage can simply try with different games. Maybe Magic finds it interesting to see how people react when Magic doesn't work - unless you pray to Magic as your new god. Or maybe you could make Magic switch itself off for everyone until they performed a ridiculous ritual involving lots of cat hair, cake, statues of gods, a crow, a toad and loud EDM music. Then you make the knowledge public in your local school involving your Unsuspecting Followers - who don't know anything more about Magic and nobody will believe these crazies that their weird Monday morning sect ritual allows them to perform miracles.
Postulate that while Magic is totally incredible it is also so alien that is doesn't realize the humans intent
This idea plays on the fact that we can only imagine how something human-like would think - but Magic is totally beyond anything we could possibly imagine.
Magic doesn't even care at your exploitation attempts
Why would Magic care? You are dead in - what? 60 years? A couple hundred depending on species and setting? Maybe a couple thousand if you are going for the "nigh-immortal Lich"-style? Why would Magic care about such short timeframes? Who says that you are the only important race or planet in the universe? Maybe Magic thinks it's funny that you are trying to exploit it and it will let you do it - just to see how the other humans/ elves/ ... will kill you because you robbed them of magic. Or to see what you will do as the sole most-powerful mage on the planet. Magic could also simply void all contracts of dead mages or postulate that now that nobody knows the rituals anymore they are void. Giving you a bit of fun is all the fun Magic has - there is no reason to work against your wishes. In fact in might even work in your favour and help you with your exploitation attempts just to see how it plays out - or to stab you in the back through the use of some Great Adventurere Party.
Magic is lonely...
Similar to the last approach this one works on the idea that Magic is gullible - no interactions with the humans/ elves/ ... mean that Magic doesn't know the subtleties of just how mean they can be. It's the same as if you were watching an ant hill - you see where some of them are going, but you can't directly understand their communication and how each one interacts with the other ones (this analogy assumes a normal person going out into his garden).
Tell Magic that you have a Great Plan to make everyone appreciate Magic
Magic doesn't want everyone to use Magic - but that doesn't mean that you can't spread the word of Magic. And how could you better spread the unified word than being the sole person who can seemingly control Magic? If Magic doesn't make any new contracts you can go around as the most powerful mage and direct the politicians to fight your wars for you - you don't want to directly use Magic against armies after all. Blackmailing politicians because you let someone poison their families (see above ideas) and then used Magic to heal them means that they will trust and help you. Oh, and the fact that your Scrying spells tell you exactly what skeletons they are having in their closets.