Press windows key + S and type power and sleep settings just single click on it.
1: Screen Option
Click on down arrow icon it shows time duration which you want to set, when your pc is plugged in turn off after
2: Sleep
Select Never if you don’t want to turn off your screen or set the time duration as suitable for you.