The Messenger of Allah ﷺ said: “If two men come to you for judgement, do not judge in favour of the first one until you listen to what the other one says. Then you will know how to judge.ʿ (Using translation from Aḥmad 1285)
"إذا تقاضى إليك رَجُلان فلا تقضِ للأوَّلِ حتَّى تسْمَع كلامَ الآخِر فسوْفَ تدْرى كيفَ تقضى".