Disable Sleep Mode - Windows 11

1. Click the Start Menu and then go to Settings.

How to open the Settings app on Windows 11 | Windows Central

 

2. Under System, go to Power & battery section.

 

3. Select Screen and sleep.

 

4. Make sure PC is set to never sleep when plugged in.