Newbie Mac user - how to start over with Mac mini that has Windows installed
The easiest way to tackle this is to treat the Mac mini as if it had a blank drive and you needed to (re)install macOS from Internet Recovery.


Install OS on iMac with blank hard drive is a post that has all of the steps involved in getting a "factory fresh" install of macOS on your machine
Your late 2012 mini already supports Internet Recovery
If all else fails, you can use your iMac to create a USB Installer of macOS