I just had the same issue. It turns out that Apple has updated the program license agreement and you just have to accept it. It's a pity that after so many years, Xcode can't show some message instead of crashing.
The information on Apple Developer Account says:
The program license agreement has been updated.
[Owner] needs to accept the latest Apple Developer Program License
Agreement for your team to continue integrating new technologies,
submitting content to App Review, accessing Certificates, Identifiers
and Profiles, and more.