From Quran

إِنَّ عِدَّةَ ٱلشُّهُورِ عِندَ ٱللَّهِ ٱثْنَا عَشَرَ شَهْرًا فِى كِتَـٰبِ ٱللَّهِ يَوْمَ خَلَقَ ٱلسَّمَـٰوَٰتِ وَٱلْأَرْضَ مِنْهَآ أَرْبَعَةٌ حُرُمٌ ۚ ذَٰلِكَ ٱلدِّينُ ٱلْقَيِّمُ ۚ فَلَا تَظْلِمُوا۟ فِيهِنَّ أَنفُسَكُمْ

التوبة/36 .

Verily, the number of months with Allâh is twelve months (in a year), so was it ordained by Allâh on the Day when He created the heavens and the earth; of them four are Sacred (i.e. the 1st, the 7th, the 11th and the 12th months of the Islâmic calendar). That is the right religion, so wrong not yourselves therein.

At-Tawbah 9:36

Hadith: Arabic Text followed by English Translation. 

عن أبي بكرة ، عن النبي صلى الله عليه وسلم ، قال : 

الزمان قد استدار كهيئة يوم خلق السموات والأرض ، السنة اثنا عشر شهرا منها أربعة حرم : ثلاثة متواليات : ذو القعدة ، وذو الحجة ، والمحرم ، ورجب مضر ، الذي بين جمادى وشعبان

رواه البخاري ٤٤٠٦ و مسلم ١٦٧٩

Narrated Abu Bakrah: That the Messenger of Allah (ﷺ) said:

Time has returned to its original order as it was on the day when Allah created the heavens and the earth. The year is twelve months, of which four are sacred: three consecutive months, Dhu’l-Qa‘dah, Dhu’l-Hijjah and Muharram, and Rajab of Mudar, which comes between Jumaada and Sha‘baan.

Narrated by Al-Bukhari, 4406 and Muslim, 1679