Overall meaning :
Allah, Exalted be He, says: Out of all the accounts relating to the messengers before you, Muhammad, We relate to you everything you need that will make your heart firm and strengthen your faith to help you convey your message. The Truth you follow has come to you through these accounts in this surah, as well as lessons and reminders for the believers.
Say, Muhammad, to the unbelievers who do not acknowledge Allah’s Unity: Persist in your ways and do whatever lies within your power to oppose Islam and harm the Messenger and his followers; we will certainly persist in our ways and continue to adhere to our religion and obey Allah’s commands; and watch and wait for the outcome of our actions. We are also watching and waiting for the outcome of your actions.
To Allah alone belongs the knowledge of what is hidden in the heavens and the earth, and to Him all will be returned and all matters will be referred on Judgement Day. Therefore, worship Him, Prophet, and put your trust in Him. Your Lord is never unaware of what you do, and He will surely repay all people according to their actions.