If you want to know how good your Mac’s hard drive health is, read out the SMART data.
SMART stands for Self Monitoring Analysis and Reporting Technology System and was introduced to determine whether mechanical hard disks are about to fail. They check themselves against specified limit values and keep a record of them. This data can be read out and then evaluated to see if a hard disk is about to fail. For example, if several sectors fail and are no longer writable, this is usually a sign that you should quickly make another backup because the probability is quite high that the disk will soon fail completely.
macOS displays only the SMART status in one word in the disk utility. If everything’s all right, it’s “Verified.” If you want more details and want to know how many operating hours the hard disk has already been running, you can download the SMART Utility. It can be started four times free of charge and displays all important data.
Some SSDs also support the SMART status, although it was intended for quite error-prone mechanical disks. Apple’s internal NVMe SSDs, which have been in use since 2015, usually indicate “not supported” in the hard disk utility because Apple believes it is no longer necessary with this modern technology. However, the SMART Utility reveals a few values.
External drives are only partially readable, it depends on the implementation. The probability is high that it only works with internal drives, but you can try it.