HDDs are mechanical with movable parts that are delicate and could be damaged. The average life of a normal HDD in consumer service is about 3-5 years. No one yet knows the average life of an SSD but probably much longer than you would likely ever own the computer.
These estimates assume no misuse or abuse and normal expected lives of electronic chips. They are both stable media. However, when an SSD fails it fails completely with little chance of data recovery. This is not quite the problem with HDDs where data loss is not always catastrophic and unrecoverable.
I use about 6 2.5" form-factor SSDs and even more mini-SSD cards. I've had some for about 5 years and others for lesser time periods. So far I've had no failures. On the other hand, I've had some HDDs for longer periods without failure.