If you have Optimize iPhone Storage set to on in Settings > Photos & Camera, then there will be a low resolution version of your photos automatically stored on your device, with the high resolution version on iCloud. If you delete your version on your device, there will still be the high resolution version on iCloud.