I had the same experience for the first few days after I installed Xcode, but, then it settled down to more normal usage. I've read that there is a bunch of indexing being done (help, other stuff) that will run in the background if you are doing real work, but, if it's not doing anything else, it grabs CPU and memory to work on the indexing databases. Similar to what Spotlight does with a new macOS install. In fact, one of the big users along with Xcode itself was the mds indexer and mds worker threads, which are used, I think, by Xcode and Spotlight for index maintenance. The other complicating factor I ran into was Time Machine backups, because all kinds of new data was being generated that would be backed up. It all finally worked itself out, and now Xcode normally works like it did before.
Although, every once in a while, after a bunch of compiling and source code re-arranging, Xcode seems to go off the deep end, and I have to force quit it and restart. Not sure what's going on, because, everything is the way I wanted, and builds completed when it comes back up. Also happens when in a low free memory situations (500 MB left on a 16 GB machine), so I've been a little more frugal in what I keep open when I use Xcode a lot.