public BlockHeader buildBlockHeader() {
    validateBlockHeader();

    return new BlockHeader(
        parentHash,
        ommersHash,
        coinbase,
        stateRoot,
        transactionsRoot,
        receiptsRoot,
        logsBloom,
        difficulty,
        number,
        gasLimit,
        gasUsed,
        timestamp < 0 ? Instant.now().getEpochSecond() : timestamp,
        extraData,
        baseFee,
        mixHashOrPrevRandao,
        nonce.getAsLong(),
        withdrawalsRoot,
        blobGasUsed,
        excessBlobGas,
        parentBeaconBlockRoot,
        requestsHash,
        blockHeaderFunctions);
  }
A utility class for building block headers.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/BlockHeaderBuilder.java