If you have recently upgraded your XCode version to 14.0, and installed the XCode command line tools too, you will probably notice some error messages when trying to run your Xamarin.Forms, or iOS application from Visual Studio for Mac.
Error MT4109: Failed to compile the generated registrar code.
What actually helped me, is this:
Navigate to https://developer.apple.com/download/all/ and search for Command Line Tools for Xcode 13.4 and Xcode 13.4. Both downloads are big, the XCode itself around 10GB and the CL Tools are around 1GB, so definitely do not do this on metered connections.
Once the downloads are ready, open the XCode.XP file with the Package Archiver, let it extract to downloads, then move it to Applications folder.
After that, install CL tools. Follow the installer’s instructions.
Boom, it’s solved. Issue reported at: https://github.com/xamarin/xamarin-macios/issues/15954