Hi Appl3l3arn
welcome to the Apple Community.
Re: “The device attached is not functioning”
Wondering whether this photo-transfer is to a Mac laptop or PC, and which MacOS or Windows OS version is installed.
You might want to try restarting your laptop:
Eg:
To restart a Mac,
choose Apple Menu (black Apple, on left in top menu bar) > Restart
For PC : Start > Power button > select Restart
____________________________________________________________
You could check your iPhone's iOS is up-to-date:
(Remember to back-up first, if you need to update)
About iOS 16 Updates - Apple Support says 16.4.1, is newest update.
______________________________________________________________
Re: "Transferring Photos"
Maybe check this article below for tips:
Connect iPhone and your computer with a cable - Apple Support
Apple support have this article below online that may help:
How to: Transfer photos and videos from your iPhone or iPad to your Mac or PC - Apple Support
or
You might want to scroll to:
"More ways to transfer photos and videos to your computer"
at the bottom of the above article:
___________________________________________________________
Trouble-shooting:
If your computer doesn't recognize your iPhone or iPad - Apple Support
In the discussion thread on a similar issue :
iPhone X "A device attached to the system… - Apple Community
Alec gives a tip that helped others with the issue:
says:
"Try This:
Settings > Photos > Where it says "Transfer to Mac or PC" Select "Keep Originals" "
All the best :-)