From Quran we know that God’s guidance was given to Adam AS, along with a promise from God that He will keep on sending such guidance to the humankind.
Quran 2:37-38
Translation by Asad
- Thereupon Adam received words [of guidance] from his Sustainer, and He accepted his repentance: for, verily, He alone is the-Acceptor of Repentance, the Dispenser of Grace. [For although] We did say, “Down with you all from this [state],” there shall, none the less, most certainly come unto you guidance from Me: and those who follow My guidance need have no fear, and neither shall they grieve.
Quran also tells us that when humanity began, they were all on the right path. Then they began to differ, upon which God started sending messengers.
Quran 2:213
Translation by Asad
ALL MANKIND were once one single community; [then they began to differ -] whereupon God raised up the prophets as heralds of glad tidings and as warners, and through them bestowed revelation from on high, setting forth the truth, so that it might decide between people with regard to all on which they had come to hold divergent views. Yet none other than the selfsame people who had been granted this [revelation] began, out of mutual jealousy, to disagree about its meaning after all evidence of the truth had come unto them. But God guided the believers unto the truth about which, by His leave, they had disagreed: for God guides onto a straight way him that wills [to be guided].
We do not know for sure the time period during which idol worshiping started, but we do know from the Quran that it happened despite that humans started off on the right track, and they kept on receiving guidance from God through prophets and messengers.