iPhone 7 and up capture pictures in HEIF or HEVC format. If you have an older mac, it may not fully support photos with higher compression. If you plug it in immediately after you’ve removed it, you won’t get the prompt.
If you don’t want to disable iCloud photos, you can change “ Optimize iPhone Storage” to “ Download and Keep Originals”. To disable iCloud photos on your iPhone, follow these steps. Because of this, Image Capture cannot access the photos from your iPhone. Instead, they are in the cloud leaving only the thumbnails on your phone. When iCloud Photos is turned on, the original photos are not stored locally on your phone.
First, try plugging the cable into a different USB port and see if it works. So, you have to check your cable and your ports. Your USB cable can be damaged which interrupts the connection between your iPhone and Mac. If this did not work, you can move on to the other fixes. Also, try using different ports to connect your iPhone.
To fix Image capture, you can try some general fixes like re-opening it and restarting both your devices beforehand.