Here's some general stuff I wrote a while ago. It might be a bit simple, but it establishes a vocabulary so we can speak the same "language."
The Photos app contains the instructions for dealing with a database that contains information about your picture files. On a Mac, the Photos app can be found in the Applications folder, and probably in the Dock of apps at the bottom (or, in my case, on the side) of your Mac. The Photos app isn't a huge file, because it doesn't have any pictures, just instructions.
The Photos Library is a package (a slightly protected folder that has stuff you're not supposed to mess with) that contains the database and the Original picture files. It also has stuff like Thumbnails (the tiny pictures in the grid view of Photos) and Previews (screen sized images for showing quickly.) On a Mac, the Photos Library is kept (usually) in the user's Pictures folder. The Library is big, many gigabytes, because it contains all the pictures. On a Mac, you can have several Libraries and switch between them, but only the one called the System Library can be connected to iCloud. On an iPhone or iPad there can be only one Photos Library, and you can't see it or access it directly. You can (and should) make backups of the Photos Library by copying it to an external hard drive.
The System Library is the Library that apps, like Messages, or Screensaver, or Safari, go to when they use a picture or save a picture in Photos. It is the only Library on a Mac that can synchronize with iCloud Photos.
The database is where all the information is stored for the pictures. As you add keywords or captions or titles, for instance, those aren't attached directly to the picture file, but they are stored in the database. This metadata is attached to the file (if you so instruct) when the file is exported for use outside of Photos. In fact, the Original picture file is never altered-- it remains available exactly as it was loaded no matter how you may make changes. The changes are recorded in the database, and they are applied when you view the image. Previews are smaller, temporary screen sized images that show the edits, but full sized edited images are created on the fly from the editing changes that were recorded. Even the original filename is no longer attached to the image-- a unique name is created for the file, and the original filename is stored in the database.
iCloud Photos is a synchronization service. When you engage iCloud Photos on a device, then the Library on that device is kept exactly the same as the iCloud Photos Library. So, for instance, if you take a picture with your iPhone, it is added to the iPhone's Photos Library, copied to iCloud Photos Library, and then copied to the Photos Library on each of the other devices. If you delete a picture on your Mac, then that picture is deleted at iCloud and on all the other devices.
You can use Optimize Storage on the Mac, on your iPhone, or on your iPad. You can set this on any device, independent of the others. You are not required to have your Mac hooked in to use "Optimize Storage" on your phone. If you want, you set this in the Photos Settings on each device. If you set a device to "Optimize Storage," then Photos may store only smaller images on the device and rely on iCloud to keep the full sized images. So, if Optimize is chosen, and you want to magnify a picture to see more detail, Photos will reach out to iCloud to get a full sized image for you to zoom in on. It's the same for editing or printing or anything that demands the full picture. Your optimized Library may take up less than 20% of the space of a fully downloaded Library. But an optimized Library may be kept larger than that if the extra storage space is not needed.
Beware, though: backing up a Mac Photos Library with Optimize Storage only backs up smaller images. If you want to keep a true backup on an external disk for safe keeping, you need to have Download Originals checked on the Mac.
In the above I was referring to a Managed Library, in which Photos hangs on to all the Original picture files in its Library. There can also be a Referenced Library where the Original picture files are kept in Finder folders and are not added to the Library at all. A Referenced Library is really for testing purposes, and accidentally creating a Referenced Library has caused lots of troubles for people. Almost no one has a Referenced Library. Managed is the default, so that's bound to be what you have. In Mac Photos Settings>General, "Copy Items to the Photos Library" should be, and probably is, checked.
I'm happy to do more-- see if this changes your questions…