Prevent M1 or M2 Macs from going to sleep with a built in tool that anybody can use.
keep your mac awake
Posted inHOWTO
Prevent Your Mac from Going to Sleep with This Built-in Tool
There’s no need for a third party app. macOS can do that for you out of the box