On your Mac, click the Apple logo > System Settings. Click Lock Screen. Use the drop-down menu beside Turn display off on ...
If Lock Screen timeout is not working in Windows 11/10, this post may help. The lock screen timeout feature enhances security and power management by locking your PC once inactive for a set period.