Note: Windows 11 instructions can be found here
Right click on the Start button then select Power Options.
- On the Power & Sleep menu, under Sleep, there is a dropdown menu with time options. Select Never to disable the computer from going to sleep. The new setting goes into place automatically.