Xcode is very efficient with memory. I just looked at my memory usage for a project with around 10,000 lines of code in it and it's using 334 mb of memory - the simulator is also running and is using 54mb.
So, even the smallest Mac memory wise is fine.
Note, this is all Apple Silicon, M1 processor.