i Cloud is all or nothing. iCloud Photos is intended to keep the set of photos on all synced devices identical.
- If you do not want to see all iCloud Photos on your iPhone do not use iCloud Photos on your iPhone. But then you will not be able to access the photos in iCloud using the Photos.app on your iPhone. Do not delete any photos on a synced device, that you want to keep in iCloud. The photos will be deleted from iCloud and all other synced devices as well.
- If you want to remove photos from your iPhone, but still want to to able to access all your photos in iCloud from the Photos.app, enable the option "Optimize iPhone Storage" on your iPhone in the Settings > AppleID > iCloud > Photos. Then iCloud will manage the storage for your photos on the iPhone. Use iCloud Photos on iPhone - Apple Support
- The only other option to store all your photos in iCloud but not to sync them to your iPhone would be to use a different AppleID for iCloud Photos on your computer and to keep. the photos you want to see on the iPhone in the Shared iCloud Photos Library.
Use iCloud Shared Photo Library
The shared iCloud Photos Library can be very convenient, if you do not need it for sharing and share the photos only with yourself. It helps to split your iCloud Photos Library in two separate sets of photos, a personal library and a shared library. You can have different personal libraries for each AppleID and shared library synced between all AppleIDs.