When you enable "optimize iPhone Storage" for Photos on your iPhone, iCloud will manage the storage for your photos for you. Whenever the storage is getting low, iCloud will remove some high resolution originals from the iPhone and keep them only in iCloud. It will first remove the originals for items,that you have not used in a long time, and replace them by smaller, optimized versions. but keep the others on your iPhone. It is fully automatic. With "Optimize iPhone Storage" enabled you should not have to worry about managing the storage, even if the storage always appears to be full, as the iPhone will automatically free storage, when you need it. But even if with "Optimize" you cannot remove the photos completely from the iPhone. The optimized versions will also need storage, up to ten to 20% of the size in iCloud. And there is a prize to pay - to be able to share the photos, to add adjustments, or to view them enlarged you will need an internet connection.
It is much easier to keep your iCloud Photos Library as small as possible and keep only the photos in your iCloud Photos Library that you will need to be able to see at all times and avoid "Optimize Storage".
To keep photos only on my Mac, but not have them on the iPhone, I have simply created a second Photos Library on my Mac, that is not syncing with iCloud. All photos, that I do not want in iCloud and on all devices are in separate archive libraries on my Mac, as an archive of all my photos and videos on an external drive. I m backing up this external drive by coning it occasionally to a different drive.