I just got my Macbook in the beginning of this month. It’s the newer Macbook Air 13.6" with an M2 chip. Just recently it has began to freeze up only letting the mouse move around and freezes as soon as seconds after booting up. I keep having to use the power button which I know is not particularly great. I checked CPU and actually uninstalled a few of my games (I have a few light steam games, all gone now) and noticed spotify was the only thing taking any energy to run at all (which was barely anything) so I turned it off. I used MalwareBytes to check for any viruses and the scan came up fine. I’m not really sure what to do? It’s very frustrating since I use my macbook for schoolwork and entertainment and constantly freezing up is ineffective for that lol. Please let me know if there anything I can try to fix it :) Thanks!
If it’s doing this right at boot up even after a reset / clean install of the OS then it’s likely a hardware failure. You can run diagnostics also, see: https://support.apple.com/en-us/102550.
Take it back and get a different one.