Swift Crashes

I am new to Swift. I updated my macOS and now when I preview code I am writing in SwiftUI from a tutorial about SwiftData, preview crashes. When I reopen the application, I get the following error message: "You can't use this version of the application 'iTours' with this version of macOS." I am running Sonoma 14.3.1 and Xcode 15.2. Any suggestions on how the resolve the issue?

This isn't a Swift related question. You're best posting on the Apple Developer Forums