You can upgrade a Mac mini (Late 2014) to Monterey – and no further.
Unfortunately, Yosemite is old enough that it may not be able to access modern https sites, and it also might have trouble accessing the App Store. I think you're going to need to upgrade the OS in stages.
Step 1: Back up your Mac.
Step 2: Upgrade to Sierra
Using a modern Mac or PC, download the .DMG file containing the Sierra installer to a USB drive of some sort. This will not create a bootable installer; just a drive with a data file on it. If this is a Mac-formatted drive, use HFS+ (Mac OS Extended) format instead of APFS – Yosemite predates APFS and won't be able to make heads or tails out of it.
How to download and install macOS - Apple Support
Transfer the USB drive to the old Mac and copy the .DMG file to the old Mac. Eject and unplug the USB drive. Open (double-click) the .DMG file to mount the disk image. Run the Sierra installer inside.
Note that the old Mac needs to be running some version of the Mac operating system, or it won't be able to use the .DMG file. The point of involving the modern Mac or PC is simply to get around the problem that Yosemite's version of Safari might not be able to negotiate a https connection to the Apple Support page.
If this succeeds, your Mac will be running versions of Safari and the App Store that likely will be recent enough to be able to access Apple Support articles and the App Store.
Step 3: Upgrade to a higher version of macOS.
You could try to do this in one jump (Sierra -> Monterey), or in stages (Sierra -> Catalina -> Monterey).
Note that Catalina and later break 32-bit applications, and get rid of iTunes in favor of separate applications (Music, TV, Podcasts, Books, and Finder-based iPod/iPhone/iPad management).