I use the 2012 mini (I have two)
Latest supported version is Catalina (10.15), but certainly Mojave is good, too.
I would suggest that if you still have a hard drive, the upgrade to Mojave will NOT result in more speed.
Consider replacing the old hard drive with an SSD. That will absolutely be the best upgrade that you can do, plus 8GB RAM, or more.
Download the Mojave installer. Don't let it install, just quit that installer when it is done with the download.
Use that installer to create an external USB installer.
You can get steps on how to do that, and also good links to download the Mojave installer on
this page.
(I do notice that page does tell you that you have to be booted to Sierra or later, or last version of El Capitan.
So, you may want to
upgrade to El Capitan first, then continue on with upgrading to Mojave.
I suggest that you should have a full backup of where you are now with Mountain Lion, so if things go south for you, you can always erase the drive and start over with what works.
Did I say that you should replace the hard drive with an SSD? Even if you choose to not upgrade at all, the SSD will give you back more speed than you would ever have from the old hard drive!
Final point: Mojave will convert the format on your hard drive to APFS file system, which your old Mountain Lion system won't even see. It will also be a poor choice with the hard drive, as the APFS format is not comfortable at all on a spinning hard drive.