I found this article written in a concise way to address the sayings of the prophet.
Please go through this link before reading my queries.
https://www.quranicpath.com/sunnishia/wahi.htmlI just wanted to add something here for your kind views.
1. Suppose you are in prophets time , And Prophet ask you to do something. Will you have the guts to compare what he says with Quran and then act? or correct him or say sorry I CANT act on what you command or ask me because it is not aligned with message of Quran? Or you would be under the assumption at that time that what ever prophet ask is or can not be wrong, but right because he is gods messenger.. What are your thoughts?
2. On the issue of prophet making mistakes, we seen it in Quran verses , be it Noah asking lord to save his son while Noah should have known that his son is not a good person. Or Prophet Mohammed himself 80:1-12. or Younus abandoning his people.
3. Finally, a prophet is also NOT like a normal person like us. He is entrusted with the trust of God. is there any example where God has cursed a prophet hell ? In quran god commanded us to believe in all prophets and god himself witness by saying names of his prophets and tell us those are good people meaning God is confirming all prophets a paradise guaranted. In which case a prophet is never like a normal person whereby a norml person will have the test and on day of judgement he will be judged and thenhe would know what is the outcome.... this may not be the case with all prophets? so there is a distinction clear. RIGHT?
Some of the relevant verses:
[9:43] (O Prophet), may Allah forgive you! Why did you give them leave to stay behind before it became clear to you as to who were truthful and who were liars?
[9:44] Those who believe in Allah and the Last Day will never ask your leave to be excused from striving (in the cause of Allah) with their belongings and their lives. Allah fully knows the God-fearing.
69:44-47]
"And if he (Muhammad) had forged a false saying concerning Us (Allaah),
We surely would have seized him by his right hand (or with power and might),
And then We certainly would have cut off his life artery (aorta),
And none of you could have withheld Us from (punishing) him"
53:1-5
"By the star when it goes down (or vanishes).
Your companion (Muhammad) has neither gone astray nor has erred.
Nor does he speak of (his own) desire.
It is only a Revelation revealed.
He has been taught (this Qur'aan) by one mighty in power [Jibreel (Gabriel)]"
38:23-24
"and he [Dawood] sought forgiveness of his Lord, and he fell down prostrate and turned (to Allaah) in repentance.
So We forgave him that, and verily, for him is a near access to Us, and a good place of (final) return (Paradise)"
66:1
"O Prophet! Why do you forbid (for yourself) that which Allaah has allowed to you, seeking to please your wives? And Allaah is Oft‑Forgiving, Most Merciful"
Finally god mentions names of many prophets and refer to them as good doers.
"Indeed, We have revealed to you, as We revealed to Noah and the prophets after him. And we revealed to Abraham, Ishmael, Isaac, Jacob, the Descendants, Jesus, Job, Jonah, Aaron, and Solomon, and to David We gave the book." (Holy Qur'an 4:163)
"And We gave to Abraham, Isaac and Jacob - all We guided. And Noah, We guided before; and among his descendants, David and Solomon and Job and Joseph and Moses and Aaron. Thus do We reward the doers of good." (The Holy Qur'an 6:84)
thanks