Drawing from the successful strategies employed by Judaism and Christianity, which utilized the concept of the Dajjal and the last hour to instil fear in their followers, Muhammad adopted similar tactics. By invoking the idea of the Dajjal and the last hour, he aimed to ensure the unwavering loyalty of his own followers and prevent any thoughts of disloyalty.

Nevertheless, one of his prophecies about the last hour was exposed shortly after his death. 

Sahih Muslim, 2953b:

Anas b. Malik reported that a person asked Allah's Apostle (ﷺ): When would the Last Hour come? Thereupon Allah's Messenger (way peace be upon him) kept quiet for a while. Then looked at a young boy in his presence belonging to the tribe of Azd Shanu'a and he said: If this boy lives he would not grow very old till the Last Hour would come to you. Anas said that this young boy was of our age during those days.

Muhammad conveyed numerous accounts of the end times to his followers, yet deliberately kept all signs VAGUE and refrained from providing explicit details or specific timelines. But he was only a human and he indeed made a mistake in this case, rendering the prophecy time-bound.

Muhammad's companions and later coming Muslim generations also feared the last hour. As a result, this particular forecast gained widespread attention. However, soon that young boy (who was mentioned in the Hadith) became old and died too, and the anticipated event of the last hour did not transpire.

In response, followers of Muhammad attempted to justify their leader's error by altering the interpretation of the hadith.

Sahih Bukhari, 6511:

حَدَّثَنِي صَدَقَةُ، أَخْبَرَنَا عَبْدَةُ، عَنْ هِشَامٍ، عَنْ أَبِيهِ، عَنْ عَائِشَةَ، قَالَتْ كَانَ رِجَالٌ مِنَ الأَعْرَابِ جُفَاةً يَأْتُونَ النَّبِيَّ صلى الله عليه وسلم فَيَسْأَلُونَهُ مَتَى السَّاعَةُ، فَكَانَ يَنْظُرُ إِلَى أَصْغَرِهِمْ فَيَقُولُ ‏ "‏ إِنْ يَعِشْ هَذَا لاَ يُدْرِكْهُ الْهَرَمُ حَتَّى تَقُومَ عَلَيْكُمْ سَاعَتُكُمْ ‏"‏‏.‏ قَالَ هِشَامٌ يَعْنِي مَوْتَهُمْ‏.‏

Narrated `Aisha: Some rough bedouins used to visit the Prophet (ﷺ) and ask him, "When will the Hour be?" He would look at the youngest of all of them and say, "If this should live till he is very old, your Hour will take place." Hisham (a sub-narrator) said that he meant (by the Hour), their death (i.e. the death of bedouins who asked this question).

Hisham, the sub-narrator of this hadith, was born 51 years after the demise of Muhammad. It is logical to assume that he outlived the young boy whose advanced age Muhammad referenced as a sign of the approaching final hour in this account.

Given the fact that numerous individuals from Hisham's era would have harbored doubts about Muhammad's prophetic abilities due to this unfulfilled prophecy, it becomes evident that Hisham felt compelled to offer a defense against these criticisms by modifying the narrative.

Moreover, a careful examination of the context in which this hadith was recorded reveals that Hisham's attempt at clarification appears weak and unconvincing. It is reasonable to presume that anyone would be aware of the fact that they will surely pass away before the youngest member of their group reaches old age. Consequently, it seems superfluous for them to pose such an obvious query to Muhammad, and for him to bother responding with information that was already common knowledge.

PS:

Along with the last hour, Muhammad also extensively used the stories about Dajjal to instil fear among his followers, so that they remain faithful to him. Please read our article: Saf ibn Sayyad (An Equally Important Incident as the Satanic Verses).