I ran into the same problem after setting up my project on my new MBA M2. After multiple restarts, I went through the System Preferences > Security & Privacy and noticed by accident that I hadn't checked the box under Developer Tools for the Terminal.app. After that, Xcode crashed when opening projects. Short panic and a restart later, the project opened again and it told me that my MBA is not registered as a device in the Provisioning Profile. After repairing, everything works now...
Maybe that helps someone...
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: