Environment:
MBP Late 2017, 16 GB, SSD 1 TB
Monterey 12.4
XCode 13.4
Update via Appstore got stuck, although more than 40 GB hard disk space available.
Go to /Applications and move XCode to trash
Downloaded XCode from here:
https://developer.apple.com/download/all/?q=xcode
Then:
cd /Applications
sudo xip -x /Users/$LOGNAME/Downloads/
Took about 10 minutes to extract & verify.
After that, start XCode, will again be verified for valid certificates, takes a couple of minutes.
After that, you're all set & good to go.
Since you didn't remove / delete any XCode related secondary files, all your former projects are still available.