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:5:97

Allah has made the Ka'bah, the Sacred House, standing for the people and ˹has sanctified˺ the sacred months and the sacrificial animals and the garlands ˹by which they are identified˺. That is so you may know that Allah knows what is in the heavens and what is in the earth and that Allah is Knowing of all things.  

God has appointed the Ka‘ba, the Sacred, inviolable, House as an ˹enduring˺ institution for mankind, ˹an institution˺ by which their religious affair is sustained, through pilgrimage to it, as is their this-worldly ˹affair˺, on account of the security ˹guaranteed˺ for those who enter it and the fact that they are not interfered with, and because all manner of fruits are brought to it (a variant reading ˹for qiyāman˺ has qiyaman, ‘˹always˺ standing’, as the verbal noun from ˹1st form˺ qāma, ‘to remain standing’, without defectiveness ˹of the middle radical˺); and the sacred month, meaning the sacred months of Dhū’l-Qa‘da, Dhū’l-Hijja, Muharram and Rajab, instituted for them to be secure from fighting during them; the offering and the garlands, instituted for their owner so that he does not suffer any interference; that, mentioned appointment, is so that you may know that God knows all that is in the heavens and in the earth, and that God has knowledge of all things: thus that appointing of His in order to secure benefits for you and to ward off harm from you, before such things came to pass, testifies to His knowledge of all that is in existence and all that will be.
القرآن:٥:٩٧

جَعَلَ اللَّهُ الْكَعْبَةَ الْبَيْتَ الْحَرَامَ قِيَامًا لِلنَّاسِ وَالشَّهْرَ الْحَرَامَ وَالْهَدْيَ وَالْقَلَائِدَ ۚ ذَٰلِكَ لِتَعْلَمُوا أَنَّ اللَّهَ يَعْلَمُ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ وَأَنَّ اللَّهَ بِكُلِّ شَيْءٍ عَلِيمٌ  

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