Xcode buid process works very slowly after MacOs Sonoma update

Hello my friends, I am using a Macbook Air M2 chip. After the MacOS Sonoma update, Xcode started to work very slowly. I installed Xcode beta. It still takes 30 minutes to build even the same line of code. Does anyone have an idea for a solution? 🥲

Xcode buid process works very slowly after MacOs Sonoma update
 
 
Q