Both Windows 10 and 11 automatically lock the screen after a period of inactivity ... make sure you back up all the registry ...