Why is Xcode taking up so much space?

The short answer

Xcode itself is about 12 GB. What grows is everything it keeps next to it: build folders for every project you've opened, a copy of iOS for every device you've plugged in, simulators for old iOS versions, and every archive you've made. After a year of development, 50 GB or more is normal.

What's safe to delete

FolderSafe?
~/Library/Developer/Xcode/DerivedDataYes. Rebuilt on the next build, which is slower once.
~/Library/Developer/Xcode/iOS DeviceSupportYes, for iOS versions you no longer test on. Re-copied when you plug that device in.
Unavailable simulatorsYes: xcrun simctl delete unavailable
Old simulator runtimesYes, if you don't test on that iOS version: xcrun simctl runtime list, then xcrun simctl runtime delete <id>
~/Library/Developer/Xcode/ArchivesCareful. They hold the symbols you need to read crash reports from shipped versions.

Keep the archives of anything you've shipped. Without them, crash reports from that version can't be read.