The Bitcoin consensus algorithm (Proof of Work) is what assures that miners are only able to validate a new block of transactions if the network nodes collectively agree that the block hash provided by the miner is accurate (i.e. the block hash proves that the miner did enough work and found a valid solution for that block’s problem).