xCode 15 - iOS 17 - Sonoma Xcode build system has crashed error & CpResource failed with a none zero

When I build a new project, I constantly get the following errors.

unexpected service error: The Xcode build system has crashed. Build again to continue.

Xcode Version 15.0 (15A240d)

and

Command CpResource failed with a nonzero exit code