If the iPhone is automatically syncing via iTunes when you connect to a computer, you can prevent that from happening by opening iTunes Preferences on the computer, click Devices in the bar at the top of the Preferences window and then put a check mark in front of "Prevent iPods, iPhones, and iPads from syncing automatically."
If you have synced photos from a computer to an iPhone and want to delete them from the Phone, you do that by syncing again but with different settings/selections. See the following from Keep your photos safely stored and up to date on all of your devices - Apple Support
If you don't want the synced photos on your iPhone, iPad, or iPod touch anymore, turn off syncing in iTunes and they'll be removed from your device. You can turn off syncing for some of your photo albums or all of them at once.
- Open iTunes on your computer and connect your iPhone, iPad, or iPod touch.
- Click on the device icon in iTunes.
- Click Photos.
- Choose "Selected albums" and deselect the albums or collections that you want to stop syncing.
- Click Apply.
- Open iTunes on your computer and connect your iPhone, iPad, or iPod touch.
- Click on the device icon in iTunes.
- Click Photos.
- Deselect "Sync Photos" then click "Remove photos."
- Click Apply.
Learn how to delete photos and videos synced from iTunes when you can't access the originals.