Are you using iCloud Photo Library as Demo implied?
iCloud Photo Library is syncing your devices with iCloud. The synced photo libraries on all devices will always be showing exactly the same photos. To store more photos on your Mac than on your iPhone create a second photos library on your Mac that is not syncing with iCloud and move all photos to that second library, before you delete them from your iCloud Photo Library.
See this Help page: https://help.apple.com/photos/mac/1.0/?lang=en#/pht6d60b524
Or, don't delete any photos from your iPhone at all. If you are using the option "Optimize Storage" on your phone, Photos will replace the full resolution photos by smaller versions and download the originals from iCloud, so you should never run out of storage.