XCode is getting too bloated, and it easily installs a whopping 8 Gb or more to your precious laptop whose disk space you have been meticulously monitoring. Although it is possible to delete unwanted SDK (such as Watch, Apple TV, iOS etc.) and platform files after XCode installation, this may not be feasible for computers that have smaller disk space. It is also not a good practice to write such a big content to the disk just to clear them later (after noticing it and figuring out how to do so).
Is there a way, maybe not quite straightforward, to install selectively only the necessary/useful components of XCode and ignore the rest?