There are 5 parts in total:
1. Magic number
2. Blocksize
3. Blockheader
4. Transaction counter
5. Transactions

1. Magic number
The fixed value is 0xD9B4BEF9, and this part occupies 4 bytes.
The magic number is not unique to BTC. Many software applications/protocols have such a design to identify file formats or protocols. For example, when a GIF is opened with a text editor, it starts with GIF. As for why it is 0xD9B4BEF9, it may be that this number has some special meaning to Satoshi.
2. Block size
Describes the number of bytes occupied by the data in the subsequent part of the block. This part occupies 4 bytes.
The maximum block size limit is now 4MB. Before Segwit, the maximum limit was 1MB, and the Segwit proposal increased the block size.
As for why the block size is limited, wouldn't it be better if a block could contain a large number of transactions, which would make the overall transaction faster? This is because Satoshi was more concerned about decentralization and security at the beginning of the design, and small blocks are more decentralized (reducing the cost of node operation), while also alleviating the problems that may be caused by network delays. In addition, the bitcoin community itself is relatively conservative, and increasing the block size is not very important in the eyes of many developers, miners, and communities. The Lightning Network and Segwit upgrades have also alleviated the problem of block size limitations to a certain extent.
3. Blockheader
The block header consists of the following 6 parts, a total of 80 bytes:
Version number Version (4 bytes)
The hash of the previous block hashPrevBlock (32 bytes, 256-bits)
Merkle tree hash hashMerkleRoot (32 bytes, 256-bits)
Seconds timestamp Time (4 bytes)
Difficulty target value nBits(4 bytes)
Nonce (4 bytes)
A simple block header example:
02000000 ........................... Block version: 2
b6ff0b1b1680a2862a30ca44d346d9e8
910d334beb48ca0c0000000000000000 ... Hash of previous block's header
9d10aa52ee949386ca9385695f04ede2
70dda20810decd12bc9b048aaab31471 ... Merkle root
24d95a54 ........................... [Unix time][unix epoch time]: 1415239972
30c31b18 ........................... Target: 0x1bc330 256*(0x18-3)
fe9f0864 ........................... Nonce
3.1 Version number (4 bytes)
The current version number is divided into three parts, starting from the highest:
1. The first part (31-29, 3 bits): For possible future mechanism upgrades, the default setting is b001.
2. The second part (13-28, 16 bits): general purpose, miners can set it by themselves. Many miners will use the bits here to expand the mining search space when using ASIC boost. (Refer to BIP-320)
3. The third part (0-12, 13 bits): used for soft fork marking. Each bit is a marking bit, which will correspond to the corresponding soft fork proposal. It can support multiple soft fork proposals, and each proposal will have a start and end time.
Version was not defined in this way at the beginning. The version of the genesis block was 1. The subsequent soft fork upgrades were all implemented by increasing the version. The switch in the network was upgraded through a double-threshold switchover. The two thresholds are the 75% rule and the 95% rule. The 75% rule means that after the most recent 750/1000 blocks support the proposal, all blocks with the new version must meet the soft fork proposal standard; the 95% rule means that after the most recent 950/1000 blocks support the proposal, all old version blocks will be rejected by the network. There are two problems with this approach: 1) lack of timeout; 2) not supporting multiple proposals. So later in BIP-9, it was upgraded to the current version protocol.
3.2 The hash of the previous block hashPrevBlock (32 bytes, 256-bits)
SHA256() hash of the previous block.
3.3 Merkle tree hash hashMerkleRoot (32 bytes, 256-bits)
All transactions are hashed according to the structure of the Merkle tree. The hash is used to prevent tampering, and the Merkle tree is used because of the concept of SPV (Simple Payment Verification) mentioned in the white paper, which is used to reduce node costs and better decentralize. (I will write about the reason why Bitcoin uses the Merkle tree later)

3.4 Seconds timestamp Time (4 bytes)
The timestamp of the current block is actually set by the miners themselves, and the network produces blocks every 10 minutes. The time here has room for manipulation and can be used as a search space for mining.
This is a second-level timestamp. Will there be a problem in 2038 (by 2038, if int is used to represent the second-level timestamp, it will overflow)?
No, the code is an unsigned int, which can be used until 2106. This is "Satoshi's experimental project", if it survives until 2106, the network will need a complete major upgrade.
3.5 Difficulty target value nBits (4 bytes)
This is to represent a difficulty value. The hash of the block must be less than this difficulty value to be considered a valid block.
Bitcoin's hash uses SHA-256, and the final generated number is a 256-bit number. The difficulty value is actually also a 256-bit number, but only 4 bytes (32 bits) are given here. 32 bits are used to represent 256 bits, so a compressed representation format similar to floating-point numbers is used here (actually scientific notation, giving up a little precision and agreeing on a format for the mantissa sign, exponent, and base).
3.6 Nonce (4 bytes)
The 32 bits here are freely filled by miners and used as a search space for mining.
4. Transaction counter
It indicates how many transactions are behind it.
5. Transactions
Here is the coinbase transaction + a bunch of transactions that miners select from the mempool to package. The more special one is the coinbase transaction. This transaction is the reward for the miner, including the newly mined block reward and the handling fee reward. This transaction is a transaction sent by the miner to his own address. Because the coinbase is sent to the miner himself, there is some room for operation, and some of it can be used as extranonce to expand the mining search space. \