Śrīmad-Bhāgavatam · Text 7.14.39
Who is speaking and story frame
दृष्ट्वा तेषां मिथो नृणामवज्ञानात्मतां नृप ।
त्रेतादिषु हरेरर्चा क्रियायै कविभि: कृता ॥ ३९ ॥
dṛṣṭvā teṣāṁ mitho nṛṇām
avajñānātmatāṁ nṛpa
tretādiṣu harer arcā
kriyāyai kavibhiḥ kṛtā
My dear King, when great sages and saintly persons saw mutually disrespectful dealings at the beginning of Tretā-yuga, Deity worship in the temple was introduced with all paraphernalia.
Read Śrīla Prabhupāda's purport on Vedabase.io