Surah Al-Maaida

5:99

مَّا عَلَى ٱلرَّسُولِ إِلَّا ٱلْبَلَٰغُ ۗ وَٱللَّهُ يَعْلَمُ مَا تُبْدُونَ وَمَا تَكْتُمُونَ

Not upon the Messenger is [responsibility] except [for] notification. And Allah knows whatever you reveal and whatever you conceal.

Tafsir 5:99

The duty of the Messenger is only to convey what Allah has instructed him to. It is not his duty to make people accept the guidance: that is only in Allah’s Hands. Allah knows what you reveal and what you keep hidden, whether guidance or misguidance, and He will repay your actions.