Though it probably goes without saying, start by rebooting the Mac mini.
To force sync Messages on your Mac, open the Messages app, click Messages in the menu bar > Settings > iMessage. Check Enable Messages in iCloud, and click Sync Now. You can also sign out of and sign back into your account there and see if that helps.
If syncing still fails, toggle the iCloud Messages switch off and back on via System Settings > [Your Name] > iCloud

If syncing still fails, toggle the iCloud Messages switch off and back on via System Settings > [Your Name] > iCloud.
If your iCloud Contacts, Calendars, or Reminders won’t sync - Apple Support
Change which apps sync and store data with iCloud - Apple Support
Still not syncing? Restart the Mac in safe mode and see if you can kick start the sync while running like that for a short period. Safe mode will often correct weird software behavior by forcing the OS to clear caches, do disk repair and other self-maintenance and housekeeping and temporarily disables third-party mods.
How to use safe mode on your Mac - Apple Support
Sign out of and back in to iCloud again and make sure you have enabled Messages and Contacts to sync.
If the above has not corrected the problem, reboot the Mac mini in recovery mode, launch Disk Utility and run First Aid on the internal drive. This is a non-destructive process so your data should be fine. Still, as always, it is good computing to make sure you have a backup of your stuff.
How to repair a Mac storage device with Disk Utility - Apple Support