SSD has a theoretical age while hdd should live forever but in the reality my SSDs lived longer than HDD so far.
Not sure where you got that information. HDD are far less reliable, on average, then flash storage. You can't endlessly re-write to a hard drive platter, eventually the grains the data is stored with will fail. Not to mention you have moving parts. The spindle motor and read-write heads will also wear out. You also can't permanently store data on a hard drive, they do have a shelf life.
Now both storage types have mitigation techniques. HDD will attempt to recover data from bad sectors and move them to new ones, then truncate the bad sectors so they aren't re-used. SSDs will remove bad flash cells if possible, drives that are over-provisioned are best at this. Both SSD and hard drives will do wear leveling. Any bit that is used too often will be ignored/data moved so that it isn't always getting burdened.
But good MLC SSDs durability can be measured in decades of normal use. TLC drives can be measured in many years. QLC is still pretty new, but it has much less endurance, but still on the order of years.
Some hard drives can last a really long time, though the older the drive, the more likely that is (larger grain size, lower platter density) With recent hard drives, they are using 2-4 grains per bit, and using shingling (where the writes are larger than the sensitivity of the read head, so they write data, and the next bit partially overwrites it, but it can still be read. No idea what the lifespan of a HAMR drive is, which is when they have to heat the platter to do writes.
Now there are the exceptions of archival drives, designed for long term offline storage, but I don't know much about what makes them better.