Well, first, you need the 3rd party app PowerPhotos ($30). This has been a trusted app for use with Photos since the iPhoto days 20 years ago. (There have been many apps that really mess up a Photos Library, so beware!) PowerPhotos makes it way easier to manage multiple libraries and to copy pictures and albums between them. I keep PowerPhotos open on my Mac anytime I have Photos open. Really, pretty much anyone who uses Photos much has this app.
The System Library is the one that is automatically used by other apps, like Safari or Screensaver, etc. If you drag a picture to the Photos icon, it goes into the System Library. There is only one System Library, and it's designated in Settings>General, like this:

"Use as System Photos Library" is grayed out, here, because this one already is. Unlike iPhones and iPads, Macs can have other Libraries, but only one System Library, and that's the only one that can connect to iCloud on a Mac.
If you turn on iCloud in Settings>iCloud, then all the pictures in this System Library are copied to the iCloud Photos Library. Also all the pictures (except duplicates) from iCloud are copied to the Mac. Photos will make both the Mac System Library and iCloud Photos Library have exactly the same pictures. The same happens if you turn on iCloud in the Photos Settings on an iPhone or iPad. They will all have the same pictures.
Each device needs enough room to handle it all. On my iPhone and iPad I choose "Optimize Storage" so that the mobile devices keep only smaller images. When zooming in or editing, the full picture is automatically pulled from iCloud. On my Mac I choose "Download Original Photos" so that I always have the full sized images available for backup. On your Mac mini, you may want to move your Library to a fast external drive, SSD is best. See this:
Move your Photos library to save space on your Mac - Apple Support
Pay special attention to formatting the drive-- An SSD should be formatted in Apple's APFS.
I think the way I started was to duplicate my Library and name it something descriptive. Then, on the original, System Library, I started deleting things I didn't consider Favorites. When you delete a picture, it's deleted on iCloud, on your iPad, everywhere, since it's all synchronized. Every picture in the Favorites Library is a copy of a picture somewhere else, so I don't mind messing with it and deleting things. You would want to get most of this done before connecting to iCloud, so iCloud won't be constantly copying and erasing maybe thousands of pictures.
New pictures from my iPhone are added to the iPhone's Library and are automatically copied to iCloud and to my Mac. Then I copy the new pictures to an archival Library, and I delete the less interesting ones from the Favorites Library.
There is a completely different way to go that I don't use, mostly because I'm too lazy to try it. That is to divide a single Library into two, a personal part and a shared part. Only the shared part goes to iCloud. This avoids having the Favorites being an additional copy, taking up more space. So you should look into this:
How to use iCloud Shared Photo Library - Apple Support