In the authentic collections it is related from Ibn ʿAbbās (may Allah be pleased with him) regarding the Almighty’s words, “And they said, ‘Do not abandon your gods; do not abandon Wadd, nor Suwāʿ, nor Yaghūth, Yaʿūq, or Nasr’” [71:23]:
He said, “These were the names of righteous men from Noah’s people. When they died, Satan whispered to their people, ‘Set up markers in the places where they used to sit and name them after them.’ They did so, yet the markers were not worshipped—until that generation passed away and knowledge was forgotten; then the markers were worshipped.” (1)
Ibn al-Qayyim said: More than one of the early scholars has related that when those men died, the people remained devoted to their graves, then fashioned statues of them; as time went on, they eventually worshipped them.
—
A brief biography of Ibn al-Qayyim: He is the eminent scholar Muḥammad ibn Abī Bakr ibn Ayyūb al-Zarʿī al-Dimashqī, the student of Shaykh al-Islām Ibn Taymiyyah, d. 751 AH. He authored many well-known and beneficial works.
“Do not abandon your gods” means: do not cease worshipping them.
“And do not abandon Wadd …” etc., means: do not, in particular, leave off worshipping these specific idols.
“So when they perished” refers to the death of those righteous men and to the deep sorrow their people felt for them.