Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:10:65

And let not their speech grieve you. Indeed, honor ˹due to power˺ belongs to Allah entirely. He is the Hearing, the Knowing.  

And let not what they say, to you, that you have not been sent ˹as a prophet˺ or otherwise, grieve you. Truly (inna: indicates a new sentence) power, might, belongs wholly to God. He is the Hearer, of speech, the Knower, of deeds, and will requite them and grant you victory.
القرآن:١٠:٦٥

وَلَا يَحْزُنْكَ قَوْلُهُمْ ۘ إِنَّ الْعِزَّةَ لِلَّهِ جَمِيعًا ۚ هُوَ السَّمِيعُ الْعَلِيمُ  

{ولا يحزنك قولهم} لك لست مرسلا وغيره {إن} استئناف {العزة} القوة {لله جميعا هو السميع} للقول {العليم} بالفعل فيجازيهم وينصرك.

See similar narrations below:

Collected by Qurʾān
quran:36:76

So let not their speech grieve you. Indeed, We know what they conceal and what they declare.  

So do not be grieved by their remarks, to you, that you have not been sent ˹by God˺ and otherwise. Assuredly We know what they conceal and what they proclaim, in this respect and otherwise, and We will requite them accordingly.
القرآن:٣٦:٧٦

فَلَا يَحْزُنْكَ قَوْلُهُمْ ۘ إِنَّا نَعْلَمُ مَا يُسِرُّونَ وَمَا يُعْلِنُونَ  

{فلا يحزنك قولهم} لك: لست مرسلا وغير ذلك {إنا نعلم ما يسرون وما يعلنون} من ذلك وغيره فنجازيهم عليه.