How Is the “Target Hash” Calculated from the Difficulty Setting?
The target hash is a 256-bit number that represents the maximum value a block's hash can have to be considered valid. The network's difficulty setting is used to calculate this target hash.
The difficulty is an easier-to-read representation of how far below the maximum possible hash value the current target is. A higher difficulty corresponds to a lower target hash, meaning miners must find a hash with more leading zeros, making the process computationally harder.