You are reading a tafsir for the group of verses 18:7 to 18:8
انا جعلنا ما على الارض زينة لها لنبلوهم ايهم احسن عملا ٧ وانا لجاعلون ما عليها صعيدا جرزا ٨
إِنَّا جَعَلْنَا مَا عَلَى ٱلْأَرْضِ زِينَةًۭ لَّهَا لِنَبْلُوَهُمْ أَيُّهُمْ أَحْسَنُ عَمَلًۭا ٧ وَإِنَّا لَجَـٰعِلُونَ مَا عَلَيْهَا صَعِيدًۭا جُرُزًا ٨
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
undefined
3

It was said in verse 7: إِنَّا جَعَلْنَا مَا عَلَى الْأَرْ‌ضِ زِينَةً لَّهَا (Surely, We have made what is on earth an adornment for it) with reference to all living forms, vegetation, mountains, minerals and everything else present on the earth. They are its embellishment. That there are snakes, scorpions, beasts and many harmful and fatal things may lead someone to doubt as to how can they be called 'an adornment for it.' This doubt is unfounded because everything in this world considered harmful, fatal or plain bad may be so in a restricted sense but, in terms of the totality of creation, nothing is bad. Everything, no matter how bad, has been invested with many benefits by Allah Ta’ ala on other counts. The medical use of poisonous and fatal life forms in the interest of human beings is an example. Therefore, things that are considered even bad are not that bad in terms of the function of this entire universe.