Sure Al-Ahzaab

33:21

لَّقَدْ كَانَ لَكُمْ فِى رَسُولِ ٱللَّهِ أُسْوَةٌ حَسَنَةٌۭ لِّمَن كَانَ يَرْجُوا۟ ٱللَّهَ وَٱلْيَوْمَ ٱلْءَاخِرَ وَذَكَرَ ٱللَّهَ كَثِيرًۭا

Ihr habt ja im Gesandten Allahs ein schönes Vorbild, (und zwar) für einen jeden, der auf Allah und den Jüngsten Tag hofft und Allahs viel gedenkt.

Tafsir 33:21

There has been for you an excellent example in what Allah’s Messenger said, carried out and practiced, for he presented his own noble self and personally engaged in battle, so how after that can you be miserly with your souls over his soul? And only he who is hopeful of the Last Day, works for it and remembers Allah abundantly will follow Allah’s Messenger (peace be upon him). As for the one who is not hopeful of the Last Day and does not remember Allah abundantly, he does not follow His Messenger (peace be upon him).