The story was stated in the Quran in Surah Al-Qalam from verse 17 to 32.
It revolved around three brothers have a garden. As being greed, two of them intended to stop being charitable and deprive the poor people from their share of the crops, and they agreed to pick all the fruits before any poor one came. “Indeed, We have tested those ˹Meccans˺ as We tested the owners of the garden—when they swore they would surely harvest ˹all˺ its fruit in the early morning,”(17)
“leaving no thought for Allah’s Will.”(18)
As a result, Allah punishment came at night before morning time; the garden was completely burned. “Then it was struck by a torment from your Lord while they slept,”(19) “so it was reduced to ashes.”(20)
But it is important to mention that the three brothers regretted after they had seen the punishment scene.
“But when they saw it ˹devastated˺, they cried, “We must have lost ˹our˺ way!”(26)
The lesson that one should learn from this story that paying charity “Zakah” increases the wealth not the reverse. Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, “Wealth does not diminish by giving Sadaqah (charity). Allah augments the honour of one who forgives; and one who serves another seeking the pleasure of Allah, Allah will exalt him in ranks.”
sunnah.com The Book of Miscellany