Not for (idle) sport did We create the heavens and the earth and all that is between!
Cf. 44:38. Similar language is employed where the Quran says that God
did not create the world frivolously (23:115) or in vain (3:191; 38:27). It means
that, unlike the tyrants and prodigal of the earth, whose glories and riches are for
play and diversion, God creates the splendor of the heavens and the earth for a
Nasr, Hossein (2015). Study Quran. http://www.islamicweblibrary.com/wp-content/uploads/2020/04/TheStudyQuran.pdf