Hello @Osama_Haddad . Welcome to the community.
This seems to be a performance problem. Could you please send us the build verbose logs? You can see instructions to get them in: Troubleshooting .NET performance problems.
dotnet build -p:reportanalyzer=true -v:diag