On the Day of Judgement Everyone will be recompensed according to what He did of Good or Evil
Allah informs of what will happen on the Day of Judgement of the great horrors. He says,
كَلاَّ
(Nay!) meaning, truly.
إِذَا دُكَّتِ الاٌّرْضُ دَكّاً دَكّاً
(When the earth is flatened, Dakkan Dakka.) meaning, the earth and the mountains will be flattened, leveled and made even, and the creatures will rise from their graves for their Lord.
وَجَآءَ رَبُّكَ
(And your Lord comes) meaning, for the session of Judgement between His creatures. This is after they requested the best of the Sons of Adam -- Muhammad ﷺ-- to intercede with Allah. This will occur only after they have requested the other great Messengers, one after another. Yet, all of them will say, "I cannot do that for you." This will continue until the beseeching of the men reaches Muhammad ﷺ, and he will say, "I will do it, I will do it." So he will go and seek to intercede with Allah as the session of Judgement will have come, and Allah will allow him to intercede for that (the Judgement). This will be the first of the intercessions, and it is the praiseworthy station that has already been discussed in Surat Subhan (Al-Isra'). So Allah will come for the session of Judgement as He wills, and the angels will also come, lined up in rows upon rows before Him. Then Allah says,
وَجَاءَ رَبُّكَ وَالْمَلَكُ صَفًّا صَفًّا (and your Lord will come, and the angels as well, lined up in rows....89:22) They will arrive in the Plain of Gathering. The words 'your Lord will come' is an allegorical expression. No one, besides Allah, knows the nature of His coming. The words 'and the angels [ will arrive ] as well, lined up in rows' are clear in meaning.
وَجِيءَ يَوْمَئِذٍ بِجَهَنَّمَ ۚ يَوْمَئِذٍ يَتَذَكَّرُ الْإِنسَانُ وَأَنَّىٰ لَهُ الذِّكْرَىٰ (and Jahannam [ Hell ], on that day, will be brought forward, it will be the day when man will realise the truth, but from where will he take advantage of such realisation?.... 89:23). No one, besides Allah, knows how exactly 'Hell' will be brought forward in the Plain of Gathering. Apparently, 'Hell' which is at the moment beneath the seventh earth will at that moment will flare up, and the oceans become part of the flame. In this way, Hell during the gathering will be in front of all.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 16–26
Man passes through two sets of circumstances in the world—sometimes finding or receiving things and sometimes losing them. Both eventualities, meant to gauge human reactions to different conditions, are for the purpose of putting man to the test. If the individual starts to boast when he receives something and acts negatively when things are taken away from him, he has failed the test.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.