I am using OSX Sonoma 14.3 and iOS 17.3. as well. When I connect my iPhone 15 Pro Max to my MacBook Air with Apple M2 chip, I will get instantly a message that an external accessory has been connected and the iPhone is appearing in the sidebar in Photos. And then it will hang for hours showing the message "Preparing to import".
When I try to import with Image Capture, the iPhone is also shown, but Image Capture requires me immediately to unlock the iPhone and the iPhone is prompting me to confirm that I trust the computer, before it will do anything. And instantly hundreds of photos will be shown in Image Capture to be imported.
After launching Image Capture and confirming the trust on the iPhone, Photos will also show photos from my iPhone, finally, but Photos does not prompt the request to unlock the iPhone and to confirm the trust on its own, strange.
Within just a few minutes after launching Image Capture, Photos will show me thousands of new Photos to import:

As I am using iCloud Photos, there should not be any new items shown - my iPhone and the Mac are perfectly in sync. iCloudPhotos is interfering with the duplicate detection on Import. I am only using the manual import, when I am away from the Internet for a long time and need to transfer the new photos manually.
When I first connected the iPhone to my Mac, I have been prompted to allow the connection of accessories. Have you received such a prompt? It may be hidden behind other windows.