I've had an M1 with 16GB for about 3 months now. I usually have about 20 tabs open across three browsers, as well as other applications. Only had to reboot it once and that was due to a flakey application. I agree with other responses that you may have an undersized machine for what you want to do with it. Also, perhaps it's XCode, not the OS that's giving you grief.