you should try to debug with a iOS simulator or device. It may be your code. if it is a Xamarin library, as they are not supported anymore, you will probably have to migrate to Maui.
Xcode 16 is currently not supported by Maui, until Maui 9 release (which will not be supported by VS for Mac). You should stay with Xcode 15. you can still build and sign with Xcode 15, and run an app on iOS 18, you just can not build with any iOS 18 dependencies (libraries).
with the upcoming Maui 9 release you can use Xcode 16 and use iOS 18 features. But you will need to switch to visual studio code, or use Visual Studio in a windows virtual machine.