To test on an iPhone device running iOS 16, you need to use Xcode 14,1 or later

After updating Xcode, test it on a real device

Developer mode disabled One-on-one, how to deal with it

On the iPhone you want to test, enable it in Settings > Privacy & Security > Developer Mode