Yup. Not sure about your iMac, recent ones don’t support target display mode and that’s more complex than just plugging your 4K telly anyway. Notwithstanding that, if you’ve just spent loads of your hard earned $ on a new MacMini just to be an iTunes server you could save yourself a lot by returning it and for example buying these, even just a WD My Cloud drive, or a QNAP/Synology NAS if you want to go large as it sounds:
https://appleinsider.com/articles/1...storage-options-for-mac-iphone-and-ipad-users
Full disclosure... I don’t think it’s a bonkers idea, as I run an iTunes server on a headless Mac Mini, but a very old and cheap 2008 MM server one which also runs as a file / print / email / backup / cache server etc It’s just if that is all you need, a MM is overkill.