Greetings monivet,
Thanks for visiting the Apple Support Communities! I understand you're unable to share photos with your iPhone, as you're receiving an error that there was an error preparing the photo to be shared.
I suggest restarting your iPhone, and ensuring your device has the latest version of iOS:
If the issue continues, and if you're using iCloud Photos with Optimize Storage enabled, then test the behavior after downloading a photo to your device before attempting to share the photo: Download iCloud photos and videos - Apple Support
"On your iPhone, iPad, or iPod touch
- Open the Photos app.
- Tap Select, then tap a photo or video. Tap more than one to select multiple photos or videos, or tap Select All to select your entire library.
- Tap More
in the lower-right of your screen. - Choose Download, then tap Download to confirm."
Kind regards.