Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:16:9

And upon Allah is the direction of the ˹right˺ way, and among the various paths are those deviating. And if He willed, He could have guided you all.  

And God’s is the direction of the way, that is, to point out the straight path, and some of them, that is, the paths, are deviant, swerving away from straightness. And had He willed, to guide you, He would have guided you, to seek the way, all, so that you would be ˹rightly˺ guided of your own choice.
القرآن:١٦:٩

وَعَلَى اللَّهِ قَصْدُ السَّبِيلِ وَمِنْهَا جَائِرٌ ۚ وَلَوْ شَاءَ لَهَدَاكُمْ أَجْمَعِينَ  

{وعلى الله قصد السبيل} أي بيان الطريق المستقيم {ومنها} أي السبيل {جائر} حائد عن الاستقامة {ولو شاء} هدايتكم {لهداكم} إلى قصد السبيل {أجمعين} فتهتدون إليه باختيار منكم.