How does Bitcoin Core know the progress of blockchain without connecting to peers?
The progress number is the ratio between the total number of transactions in the active (validated) chain, and the expected total number of transactions at the current point in time. The latter is estimated based on statistics that are hardcoded in the Bitcoin Core source code, and updated every major release.

For example in version v0.19.0, the source code, you find:


chainTxData = ChainTxData{
    // Data from RPC: getchaintxstats 4096 00000000000000000005f8920febd3925f8272a6a71237563d78c2edfdd09ddf
    /* nTime    */ 1569926786,
    /* nTxCount */ 460596047,
    /* dTxRate  */ 3.77848885073875,
};



Which implies that at timestamp 1569926786 (Tue Oct  1 10:46:26 UTC 2019), the total number of transactions in the chain was 460596047. After that point in time, 3.7785 transactions per second are expected.

The total number of transactions at present is then estimated as:


If last_block_time &lt; nTime, (current_time - nTime) * dTxRate + nTxCount
If last_block_time &gt; nTime, (current_time - last_block_time) * dTxRate + last_block_total_tx_count