Compare block hashes and state roots at a common finalized height. Head blocks can reorganize. A finalized block is protected by economic consensus, not a guarantee against every failure.
Primary reference
https://ethereum.org/developers/docs/consensus-mechanisms/pos/Introductory guide, not a completed live module or comprehensive expert audit.