Nonce is an arbitrary number used by miners to verify new blocks. It is a random or pseudo-random number.
Under the PoW consensus, the nonce is part of the block header. The block header contains the following content:
The miner generates a random number and appends it to the hash of the current block header value, then rehashes the value and compares it to the target value (a 256-bit number that is the hash of the block header). This process is repeated until the resulting hash value meets the requirements (less than or equal to the target value). The miner is then deemed to have found the solution and is awarded the block.
The nonce in a Bitcoin block is a 32-bit (4-byte) field. Therefore, it provides a search space of 2³² (=4,294,967,296) bits.
However, due to the huge search space, it is almost impossible to "guess" without calculation. This iterative calculation consumes time and resources and constitutes the so-called "work" in Proof of Work (PoW). This computational process is also known as "mining".
Block difficulty remains the same across the entire network. In theory, all miners have the same chance of finding the correct hash. Cryptocurrency networks will typically set a target number of blocks they want to process within a specific time period, and adjust the difficulty as needed to ensure this goal is achieved. For example, Bitcoin’s difficulty is fixed approximately every two weeks. If the number of blocks processed does not reach this target, the difficulty will be reduced by how much the difficulty decreases depending on how far the processing time exceeds the limit.