Narrated 'Abdullah bin 'Abbas: That Abu Sufyan told him that Heraclius said to him, "I asked you about the outcome of your battles with him (ie the Prophet ﷺ ) and you told me that you fought each other with alternate success. So the Apostles are tested in this way but the ultimate victory is always theirs.
The hadith also reminds us to never lose sight of what is important - having faith in Allah no matter what happens around us or how hard things may seem at first glance. We should trust that He will guide us through any situation if we put our trust in Him completely and strive to do good deeds according to His commands.