iCloud Photo- How to save to the cloud but not share photos between devices
You can't do it permanently.

iCloud is a syncing system and not (primarily) a backup system.  It's main goal is to allow you to share your photos and documents between all devices signed-in with the same Apple ID.

You can either not sign-in to a device with the same Apple ID, create a new, different Apple ID for the device you don't want your photos (which create problems if you do want to share other documents), or not use iCloud for your photos.