How does the node system understand which ledger is the latest before updating their own ledger?

I have two specific questions:

How does a new user realizes which is the correct copy of the ledger to be used when initially updating(downloading) the ledger, and why is it that a user cannot deceive it by broadcasting its ledgers manytimes. (there by giving the system a pseudo idea that that is indeed the majority ledger)

How does one understand if the two ledgers are the same? Does the hash function change with the last transaction? My specific doubt would be that considering that the hash will change with the guesses too even if the last block info is the same then how does the system realize that these are from the same block even if their final values are diff.

Recent Questions – Bitcoin Stack Exchange