Thank you for your question. This is a question that has concerned scholars of the Islamic world since the beginnings of the science of theology. While the Quran affirms the ultimate Will of God in verses like (76:30) and (81:29), other verses clearly state that people are accountable for their actions such as (99:7-8). So the answer to this question lies in between the Will of God and the pure free will of His servants and is neither extreme is correct. Rather, the answer to this question lies in between.
May you always be successful