I have solved this problem. This is a bug. The bug from macOS 12.
Why I am saying this?
I tried to wipe all the disks and reinstall macOS 12.2, then install Xcode, start Xcode Server, crash on the same error.
Finally, in retrospect, my M1 computer was upgraded from macOS 11, and when it was activated on macOS 11, due to misoperation. This resulted in the need to execute the 'xcscontrol —reset' command in macOS 12. So the reason for this problem is the reason for the system.
Last night, the same use of erasing disks, installing macOS 11.6, then installing Xcode all came back together. In the coming year, I don't plan to upgrade to the latest system.
I feedback this bug to Apple, hoping that someone can solve this problem quickly.