If you decide to format (to configure) your hard drive you might wonder if it will remember the bad sectors after formatting (damaged sectors).
Assuming that the disk format is NTFS, which is the most common in our time, then the answer is that yes, the disk remembers bad sectors.
A domain is considered corrupted when it is not accessible. Information about corrupted domains is stored in a specific file ($BadClus) which, however, is deleted after the format.
From there on it depends on the hard drive model, but the most modern ones automatically detect and mark the damaged sectors, resulting in the operating system not even knowing that there are problems with the disk. In this case, the operating system cannot affect the internal counting of the disk.
In reality a format might “clean up” if a problematic sector is damaged or not, and return to you areas that appeared damaged but were not , however the truly damaged areas you will not be able to recover with the disk configuration.
Remember, however, that damaged sectors on hard drives are usually a good warning to replace them, so you don't lose your data, as formatting will not halt the drive's deteriorating course.

