I have Docker Desktop installed and found that Xcode wouldn't update until I reduced the Disk image size in Preferences -> Resources, despite having 35GB free and Docker only actually using 2.3GB.
I discovered this after looking in Storage Management where it was suggesting Docker was using 60GB but only 2.3GB on disk.