Assuming that you have enough storage space on the new Mac mini, you can connect the Time Machine backup drive to the new Mac mini and ask Migration Assistant to migrate from it.
Note that while the Mac mini (Late 2014) originally shipped with Yosemite, you can upgrade it as far as Monterey. That should be sufficient to manage an iPhone or iPad running iOS 18 or iPadOS 18 … even though Monterey is no longer one of the "most recent three" versions of macOS supported by vendors such as Microsoft and Adobe.
If you are still running Mojave or earlier on the old Mac mini, you may be using some 32-bit Intel applications that won't be able to run on the new Mac mini. The new Mac mini should be able to run many 64-bit Intel applications with the help of Rosetta 2 translation. (There will be a delay the first time that you need to run an Intel application, while the Mac translates it, but the Mac will save the translation, so that subsequent launches are faster.)