Messenger of Allah, one man fights fgr the spoils of war; another fights that he may be remembered, and another fights that he may see his (high) position (achieved as a result of his valour in fighting). Which of these is fighting in the cause of God? The Messenger of Allah (ﷺ) said: Who fights so that the word of Allah is exalted is fighting in the way of Allah.
Sahih Muslim Book 33, Hadith 214