Syncing with iCloud doesn't remove photos from the phone. iCloud is a syncing service, NOT an archive. If you are out of space on your iPhone, the only way to get more space is to delete things from your iPhone you don't need or use. But, syncing with iCloud, means when you delete a photo from your iPhone, it will delete on all devices you sync with iCloud, including in iCloud itself.
A better solution would be to use another photo backup service, such as Google Photos or Amazon Photos (if you're a prime member), dropbox, or any myriad of photo storage options.
You can also transfer the photos from your iPhone to your home computer directly by following the directions in this link --> Transfer photos and videos from your iPhone or iPad to your Mac or PC – Apple Support (UK)
Once you have safely moved your photos to the backup service you choose, then you can safely remove them from your iPhone. But they will also be removed from iCloud as well.
Next time you purchase an iPhone, you should seriously consider one with more memory. You clearly don't have enough memory on the phone you currently own and once purchased, memory can never be increased.