Before you see in this tutorial how to deactivate Sleep fashion on Mac, you should know that this option is only recommended in temporary situations. For example, when on Mac you have a task that could be interrupted when the system macOS get in the way Sleep.
Apple does not offer on macOS an explicit option to disable the mode Sleep, and if on iMac the screen closes, in the settings default this will automatically enter Sleep.
How do you disable Sleep fashion on Mac - macOS Ventura
1. You open System Settings, then to the settings from Display → Advanced, the option to prevent automatic entry into is activated Sleep mode when the display closes. "Prevent automatic sleeping when the display is off"
In the step above, you learned how to deactivate Sleep pe Mac when the screen closes.
2. I noticed that although the automatic entry in Sleep modes when the screen from Mac closes, there are applications that suspend their tasks. It is best to disable or increase the time until the screen saver is activated and disable the screen lock.
As I said at the beginning, these settings are only recommended for a limited period of time, if you have tasks that require Mac to stay open for a period of time.
The biggest consequences are high electricity consumption and hardware wear.