Glossary
DerivedData
Xcode's build cache: indexes, module caches, and intermediate products that the next build can recreate.
DerivedData is the directory Xcode uses for a project's generated build state. Indexes, precompiled modules, and intermediate build products land there so the next compile can reuse them. The usual location is ~/Library/Developer/Xcode/DerivedData. Your source tree is not stored there.
Removing it does not delete the project. It makes the next build slower, because Xcode reconstructs the cache. Disk Housekeeper Smart Clean can include DerivedData. You get a preview first, and the removal goes to the Trash by default. See Clear Xcode DerivedData.