Allah says in the Quran,
ٱلْحَمْدُ لِلَّهِ ٱلَّذِىٓ أَنزَلَ عَلَىٰ عَبْدِهِ ٱلْكِتَٰبَ وَلَمْ يَجْعَل لَّهُۥ عِوَجَا
قَيِّمًا لِّيُنذِرَ بَأْسًا شَدِيدًا مِّن لَّدُنْهُ وَيُبَشِّرَ الْمُؤْمِنِينَ الَّذِينَ يَعْمَلُونَ الصَّالِحَاتِ أَنَّ لَهُمْ أَجْرًا حَسَنًا
“All praise is due to Allāh, who has sent down upon His Servant the Book and has not made therein any deviance. [He has made it] qayyiman, to warn of severe punishment from Him and to give good tidings to the believers who do righteous deeds that they will have a good reward.” [18:1-2]
Qayyiman in its literal form means that which corrects, that which takes something deviated and makes it upright. So instead of society thinking about the Quran that everything was going fine before it came, the Quran is arguing the exact opposite. You were deviated and it made you upright. It also tells us that as the book was coming down, it was setting things right right away.