Deuteronomy 19:19 Then shall ye do unto him, as he had thought to have done unto his brother: so shalt thou put the evil away from among you.
God instructed His people never to accept the testimony of one person against another. He commanded that they have two or three witnesses. This was the way to know for sure what had happened.
He also had special commands about false witnesses. The judges were to make an earnest attempt to find the truth. They were to check and make sure the witness was telling the truth.
If a witness was found to be lying, they were to be given the punishment that would have been imposed on the accused. The false witness ran the risk of an equal penalty if caught lying.
I never read the Word of God without being astonished at how great it is. These laws were superior to our laws today. They had protections built into their system.
God is great. His Word is wonderful. I hope you see that more and more every day as you read and study the Bible.