On macOS, you can go to System Settings > Lock Screen to change when the display turns off, and on Mac laptops you can use ...