In my experience most hard drives fails because there's too many spindowns (you can check that parameter in S.M.A.R.T., it's usually called "Power_Cycle_Count". Usually drive can survive few thousands head retractions/lockdowns and then dies.
HDD constantly rotates at nominal speed (usually 5400 or 7200 times per minute), until it reaches inactivity timeout and goes to sleep (it spindowns and head is retracted and locked in safe position[it wears head quickly]). It saves power and prevents damages in case of hdd shocks(when laptop is moved, etc), but destroy heads after to many cycles and causes lags(when application/OS want's to access some file, it need to spin-up to nominal speed, unlock head, etc...it takes at least few seconds)
Enterprise-grade disk got longer values (15-20min, but usually), while consumer drives got as low values as 2-5min. In windows 98 it was called 'standby mode' and was activated after 5min by default(it was recommended to change "computer role" from "desktop" to "server"). It was very bad for hard drives.
Some drives spin-down by themeselvs after 20seconds:
https://community.wd.com/t/wd-blue-2-5-goes-to-sleep-spin-down-after-20seconds/141133
There were even buggy machines, like old, cheap and bulky Acer notebooks with 3.5" IDE drives that had BIOS with hardcoded spindown values for 3 minutes(not sure about value, but it was not-overridlable), and if for example Firefox or Word(or any other app) flushed data every 5 minutes it wass powered on, it's not hard to wonder why HDD were dying every few months. Acer never fixed BIOS or replaced machines under warranty (at least in Poland). The only workaround was to write some data every 2 minutes and people were using it. (and there were much more buggy hardware from different vendors. It's only example)
But returning to topic, albeit rotational speed, inactivity timeout is main difference between enterprise/performance disks vs powerfriendly/consumer/green drives, and it sometimes it was the only difference i.e. between consumer WD Green drives and NAS Red drives. (they modify drive firmware to show in charts it's more reliable/less laggy for perormance/enterprise drives or modify it to have very agressive power-management because people likes now power-friendly/eco drives and it looks better in charts for them[albeit company know it will destroy drive very quickly)
Under linux you can usually change this value(temporarily or permamently) by using sdparm(or hdparm for olders HDDs). In some old machines it was BIOS-controlled and sometimes you must use vendor-dependant tool(like wdidle3.exe from DOS for some WD drives) and sometimes you are out of luck(it's hardcoded in firmware and there's no way).
Under Windows you can change that in power-management settings (if drive/BIOS supports that).