When you leave your PC unattended for some time, Windows puts it into the standby mode to save the battery power. This feature is available in the Windows operating system for many many years but it has stayed the same over all these years. Microsoft has not added any advanced criteria to put the PC into the standby mode other than the inactivity for some time. If you want a much more advanced and smarter way to put your PC into the standby mode, then you can try the Stand-Bye software.
This open-source software is available both as an installer a well as a portable tool. In the settings of the Stand-Bye software you can define when and how your system goes into the standby mode. You can specify the CPU usage threshold, RAM usage threshold, hard disk activity threshold, and the network data transfer threshold for initiating the standby mode.
It also has a very convenient setting to prevent your PC from going into the standby mode when you are doing nothing but listening to the music or watching some movie on your PC. In this setting, it detects if a sound is being played and prevents the standby mode if there is some sound playback.
In addition to preventing the standby mode when the sound is playing on your PC, it can also prevent the switch-over to the standby mode when some of the pre-selected processes are running on the system. You can choose any of the programs or processes for this purpose from under the Exception Processes tab.
Under the Advanced Settings tab you can choose to make the Stand-Bye program run automatically with Windows and make it display a basic tutorial about how to work with the program.
You can get the Stand-Bye program from https://github.com/flobaader/Stand-Bye/releases.