Anas narrated that the Messenger of Allah (ﷺ) said:
When Allah wants good for his slave, He hastens his punishment in the world. And when He wants bad for His slave, He withholds his sins from him until he appears before Him on the Day of Judgement.
And with this (same) chain, (it was reported) from the Prophet (ﷺ) who said: Indeed greater reward comes with greater trial. And indeed, when Allah loves a people He subjects them to trials, so whoever is content, then for him is pleasure, and whoever is discontent, then for him is wrath.