Answer:
Ibrahim pbuh was a Muslim. (The meaning of the Arabic word Muslim, or Aslam is Submitting oneself to Allah ). Allah Almighty gave him a sound judgment at an early age.
The true Islam is to submit to Allah with one’s heart and to follow His rules with obedience. (Abraham was neither a Jew nor a Christian; he submitted in all uprightness and was not a polytheist.) Aal-Imran 3:67
Hanif: (in Arabic) means that he submitted to Allah and deserted all else.
(This was the advice of Abraham—as well as Jacob—to his children, ˹saying˺, “Indeed, Allah has chosen for you this faith; so do not die except in ˹a state of full˺ submission.”) Al-Baqara 2:132
(And indeed, We had granted Abraham sound judgment early on, for We knew him well ˹to be worthy of it˺.) Al-Anbiya 21: 51
إبراهيم عليه السلام كان مسلما.( و كلمة إسلام من الاستلام لله تعالى). و لقد رزق الله تعالى إبراهيم عليه السلام الحكمة منذ صغره.
و حقيقة الإسلام : الاستسلام لله بالقلب و الانقياد له بالطاعة.
)مَا كَانَ إِبْرَاهِيمُ يَهُودِيًّا وَلَا نَصْرَانِيًّا وَلَـٰكِن كَانَ حَنِيفًا مُّسْلِمًا وَمَا كَانَ مِنَ الْمُشْرِكِينَ ( أل عمران 3: 67
حَنِيفًا : المقبل على الله المنحرف عما سواه
وَوَصَّىٰ بِهَا إِبْرَاهِيمُ بَنِيهِ وَيَعْقُوبُ يَا بَنِيَّ إِنَّ اللَّـهَ اصْطَفَىٰ لَكُمُ الدِّينَ فَلَا تَمُوتُنَّ إِلَّا وَأَنتُم مُّسْلِمُونَ ( البقرة 2: 132
( وَلَقَدْ آتَيْنَا إِبْرَاهِيمَ رُشْدَهُ مِن قَبْلُ وَكُنَّا بِهِ عَالِمِينَ )
الأنبياء 21: 51