There, [on that Day], every soul will be put to trial for what it did previously, and they will be returned to Allāh, their master, the Truth, and lost from them is whatever they used to invent.
The gods of the Idolators will claim Innocence from them on the Day of Resurrection
Allah said:
وَيَوْمَ نَحْشُرُهُمْ
(And the Day whereon We shall gather them) Allah will gather together all the creatures of earth, human and Jinn, righteous and rebellious. He said in another Ayah:
وَحَشَرْنَـهُمْ فَلَمْ نُغَادِرْ مِنْهُمْ أَحَداً
(and We shall gather them all together so as to leave not one of them behind.)18:47
(then We shall say to those who did associate partners: "Stop at your place! You and your partners.") He then will command the idolators to stay where they are and not to move from their destined places so they would be separated from the place of the believers. Similarly, Allah said:
Described in the sixth verse (30) is what would happen to both the peoples of Jannah and Jahannam by saying that, in this excruciating place called the plains of Resurrection, everyone would have assessed his or her respective deeds, individually and personally, whether they were beneficial or harmful. And they all would then be taken to their true Lord, the only One worthy of worship. At that time, all options of trust and support one usually looks up to will stand terminated. Even the idols the Mushriks used to take as their patrons and intercessors will evaporate in thin air en-block.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 30–32
All of the observances of shirk (attributing partners to God) are based on false hopes. Events which occur by God’s will are attributed by man to false gods, which in his self-delusion he makes the centre of his obeisance and worship. He depends so much on these false gods of his that he thinks that even in the Hereafter they will come to his help against God and save him from God’s scourge. These are but false hopes, but in the world their falsehood does not become clear, because due to the conditions of man’s trial here, a veil of secrecy covers every reality. Here man has the opportunity to attribute the various events to his imaginary gods and thus be satisfied with their ‘godliness.’ But in the Hereafter all realities will be laid bare. There, it will become clear that in this universe nobody has power except the one and only God. In the present world, man is living under the misunderstanding that, with the help of his leaders and false gods, he will be successful in the stages of the Hereafter, but in the Hereafter it will suddenly be clear to him that this confidence of his was absolutely false. Here, everybody will be requited according to what he himself has done and all imaginary supports will disappear as if they had never existed.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.