Have you tried internet recovery mode?
This was not a free MacOS, it had to be purchased, and I think you can still buy it from Apple.
But....
Your 2012 Mac Mini did not come with Lion 10.7, it came with Mountain Lion, 10.8, which I think was the last MacOS version that had to be purchased.
We test and certify all Apple refurbished products and include a one-year warranty.
www.apple.com
But....
Why do mountain Lion? Why not something newer and free? High Sierra runs great on the 2012 Mac Mini, especially if you install a SSD, or use one externally.
Do you need an older OS for some SW compatibility?
Maybe explain what you are trying to do and why for us to better help you.