From Sahih Bukhari (Hadith 2083):
Narrated Abu Hurairah (ra):The Prophet (ﷺ) said "Certainly a time will come when people will not bother to know from where they earned the money, by lawful means or unlawful means." (See Hadith no)
Reference: Bukhari 2083