Ibn Abbas (May Allah be pleased with them) said:
One day, I was riding behind the Prophet (ﷺ) when he said, "O boy! I will instruct you in some matters. Be watchful of Allah (Commandments of Allah), He will preserve you. Safeguard His Rights, He will be ever with you. If you beg, beg of Him Alone; and if you need assistance, supplicate to Allah Alone for help. And remember that if all the people gather to benefit you, they will not be able to benefit you except that which Allah had foreordained (for you); and if all of them gather to do harm to you, they will not be able to afflict you with anything other than that which Allah had pre-destined against you. The pens had been lifted and the ink had dried up".[At- Tirmidhi].Another narration is: Messenger of Allah (ﷺ) said, "Safeguard the Commandments of Allah, you will find Him before you. Remember Him in prosperity and He will remember you in adversity. Be sure that which you miss, was not to hit you; and what hits you, was never to miss you. Remember that the Help of Allah is obtained with patience, and relief emerges after distress, prosperity follows adversity, and hardship is followed by ease".
Arabic/English book reference: Book 1, Hadith 62