This solution worked for me https://stackoverflow.com/questions/71618452/failed-to-prepare-device-for-development-with-xcode-13-2-1-and-ios-15-4-devic/71667372#71667372. I had to download support files for iOS 16.4
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: