I am confused with the block chaining, as i know a block header contains a reference to the previous block header hash with the merkle root and other fields. This header hash is related (computed) to the header and not including the block of transactions, so if the header is tampered the chain will fail. I understood that, but if the transactions in the block are edited, it will not change the header hash only if the merkle root is re-calculated.
My question is when a node receive a block, how it verifies it (just rehashing the header, or recalculating merkle root first then rehashing the header)?