Xcode Version is 16.0 (16A242d), The Xcode prompts "Xcode will continue when the operation completes."for a long time, and never dismiss.
Xcode 16.0 Can't detect my iPhone running iOS 18
This happened to me. I had to go into Settings > Developer Mode > Clear Trusted Computers. Doing so brought up a dialog to trust the computer I was connected to. After selecting "Trust" I was able to build and run normally from Xcode.
It might help to disable wifi and use a wired connection.