Verily We have sent thee in truth as a bearer of glad tidings and a warner: But of thee no question shall be asked of the Companions of the Blazing Fire.
According to Maariful Quran, under the commentary of Surah 2 ver 6-7,
The meaning of ‘Indhar’ (warning) by a Prophet
In translating the first of these two verses, we have used the
English verb ‘to warn’ for the Arabic word Indhar. This word actually
signifies bringing news which should cause alarm or concern, while
Ibshar signifies bringing good news which should make people rejoice.
Moreover, Indhar is not the ordinary kind of warning meant to
frighten people, but one which is motivated by compassion and love,
just as one warns one’s children against fire or snakes or beasts.
Hence a thief or a bandit or an aggressor who warns or threatens
others cannot be called a Nadhir (warner). The latter is a title
specially reserved for the prophets (peace be upon them) , for they warn people
against the pains and punishments of the other world out of their
compassion and love for their fellow men. In choosing this title for the
prophets, the Holy Qur’an has made the subtle suggestion that for
those who go out to reform others it is not enough merely to convey a
message, but that they must speak to their listeners with sympathy,
understanding and a genuine regard for their good.
In order to comfort the Holy Prophet (peace be upon him) the first of these
verses tells him that some of the disbelievers are so vain, arrogant and
opinionated that they, in spite of recognizing the truth, stubbornly
persist in their refusal and are not prepared to hear the truth or to see
obvious proofs, so that all the efforts he makes for reforming and
converting them will bear no fruit, and for them it is all one whether
he tries or not.
The next verse explains the reason, that is, Allah has set a seal on
their hearts and ears, there is a covering on their eyes, all the avenues
of knowing and understanding are thus closed, and now it would be
futile to expect any change in them. A thing is sealed so that nothing
may enter it from outside; the setting of a seal on their hearts and ears also means that they have altogether lost the capacity for accepting the truth.
The Holy Qur’an describes the condition of these disbelievers in
terms of their hearts and ears having been sealed, but in the case of
the eyes it refers to a covering. The subtle distinction arises from the
fact that an idea can enter the heart from all possible directions and
not from one particular direction alone, and so can a sound enter the
ears; an idea or a sound can be blocked only by sealing the heart and
the ears. On the contrary, the eyes work only in one direction, and can
see only the things which lie in front of them; if there is a covering on
them, they cease to function. (See Mazhari)
Shafi, Muhammad (2008). Maariful Quran. (Vol .1 pg. 116-117) http://www.islamicweblibrary.com/wp-content/uploads/2020/04/maarif-volum1-english.pdf