Humans have free will and are predestined, but the universe is just predestined, because Allah (Glorified be He) gave them minds, hearing, sight, and volition. By these, they know what is good and bad, what will benefit and harm, and they choose what suits them. In this way, they are responsible regarding (Part No. 3; Page No. 517) the commands and prohibitions that they were given, and have the right to be rewarded for obeying Allah and His Messenger and punished for disobeying Allah and His Messenger. In regard to being predestined, this occurs because humans cannot escape, due to their words and deeds, the Divine Decree and the Will of Allah (Glorified be He), Who says:
No calamity befalls on the earth or in yourselves but it is inscribed in the Book of Decrees (Al-Lauh Al-Mahfûz) before We bring it into existence. Verily, that is easy for Allâh.
He (Glorified be He) also says:
To whomsoever among you who wills to walk straight.
And you cannot will unless (it be) that Allâh wills - the Lord of the ‘Alamîn (mankind, jinn and all that exists).
It is He Who enables you to travel through land and sea
There are many Ayahs (Qur'anic verses) and sound Hadiths that indicate what we have mentioned, for those who reflect on the Qur'an and the Sunnah.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.