What is Consensus Mechanism
A consensus mechanism (also known as a consensus protocol/algorithm) is a "rule" to make sure all nodes on the blockchain are synchronized (achieve agreement) with each other. In other words, it is a protocol to make every node validator agree on which transaction can be added to the blockchain without any need to trust each other.
There are many different types of consensus mechanisms, depending on the blockchain's application scenarios, such as PoW, PoS, DPoS, PoA, etc. While they have differences regarding their energy usage, security, and scalability, all consensus mechanisms are engaged to ensure transaction records on nodes are credible and secure.
You might also be interested in the following information:
What else do you want to learn?