Rainwater Harvesting is a practice followed by India, Pakistan, Afghanistan, and Iran at 3rd century BC to collect and store rainwater from rooftops, land surface, and more. Due to rapid urbanization, the ground water recharge has been decreased drastically. So, this technology is now implemented in almost all parts of the world for the increasing ground water level, wells, pits, and trenches.
Have a loot at the below ppt for in-depth details on how a rainwater harvesting system is done: