When you upgrade to a new major macOS version, you need
around ~35 GB of free disk space. When building, Xcode produces a lot of build artifacts, most of them stored in the so-called DerivedData folder — this can easily take 2–10 GB even just for one project. Let’s also leave 10 GB for other apps and tools (e.g.
SwiftLint installed via
Homebrew) that you will want to install even if you don’t use the Mac for anything else but development. This adds up to a ~95 GB minimum.