Xcode expansion and opening

I have a 2017 macbook pro with macOS monetery installed. I need to download Xcode and so i purchased a 1TB SSD to download it off of the developer website, i downloaded it on the SSD and now i have been stuck. For over a month now I have not been able to “expand” Xcode, it repeatedly freezes at one portion or at the very end for hours and so i just restart it. Only one time did the expansion process finish but then every time i would open Xcode, the icon would bounce for a second or two and then it would say “Xcode quit unexpectedly”. I’ve tried buying entire new hard drives, i have tired downloading different versions of Xcode, I have tried downloading off of the app store instead. The entry barrier to even get this app downloaded is so incredibly inconvenient and i don’t understand why. Please if anyone can help me i have spent 4 weeks now almost every night trying to just get Xcode to actually download and WORK.

Why would you need to purchase an SSD for a 2017 MacBook Pro? Doesn't it come with an SSD? It sounds like your computer is not functional.

Xcode expansion and opening
 
 
Q