Xcode 12 is BIG. Its possible your hard drive is almost full, so the OS has to compress your SWAP space, which really slows things down.
So check your disk free space. 500 GB SSDs are not that big.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: