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.
Now, about your Mac: iCloud synchronizes the Photos Libraries of all your connected devices. If you connect your Mac, then the pictures that are in the Photos Library of your Mac, shown by the Photos app, will be copied to iCloud Photos and then copied to your iPhone and iPad. And all the pictures in iCloud Photos will be copied to your Mac. The synchronizing goes both ways. Is this what you want? If so, skip the next paragraph:
If you don't want your current Mac Photos Library to be shared with your other devices, but you do want to see your iPhone's pictures in Photos on your Mac, then you should create a new empty Library, and use it for the syncing. To make a new Library for the Mac, close Photos, option click the Photos icon, and choose Create New from the Library dialog. You can use the same dialog to switch between Libraries whenever you want.
To connect a Mac Library to iCloud, first make sure that it is the System Library. Only the System Library can connect to iCloud.

If your Library is already the System Library, then "Use as your System Library" will e grayed out.
Then go to Settings>iCloud and connect this new Library to iCloud.

Set "Download Originals," if you have the storage space available on your Mac. If not, you can check "Optimize."
Then wait. Wait some more, and eventually this new Library will fill with full sized images from iCloud.