وَمَا خَلَقْتُ الْجِنَّ وَالْإِنسَ إِلَّا لِيَعْبُدُونِ
And I (Allah) created not the jinns and humans except they should worship Me (Alone). (51:56)
This honourable verse contains the reason for which Allah created the creation and that is to worship Allah alone and observe sincerity in worshipping Him.
So Allah the Most High mentions creating first, “ I did not create the jinn and humans except….” so that they do the second thing He mentions (ie. worshipping Him alone) as He says “ ….except to worship Me (alone).”
And the Arabic style employed here is that of exclusiveness and confinement (and I did not create the Jinn and Humans except) for a single purpose or unique goal which is to worship Allah (alone) and He did not create them for any other thing.
(Shaykh Abdur Razzaq Al Badr in his explanation of the book “Kitaab at Tawheed” source:https://t.me/mtoon_altawheed)