This option may not appear for Mac M1 users and it will have no effect on Solid State Drives (SSDs). Go to the Energy Saver settings. Click to checkmark Put hard disks to sleep when possible. Close the window.