Hey!
I have been facing the same problem on my 2017 MacBook Air with 8GB of RAM and 128GB of storage. I have 38GB of storage whereas Xcode only requires 11GB. What I did was I went to the developer website and downloaded the zip file from there. Now, it works perfectly! Here's the link: https://developer.apple.com/download/more/