Ashura used to be fasted before Ramadan was prescribed. When Ramadan was revealed, the Prophet ﷺ said, "Whoever wishes may fast it, and whoever wishes may not."
حدثنا عبد الله بن محمد حدثنا ابن عيينة عن الزهري عن عروة
كان عاشوراء يصام قبل رمضان فلما نزل رمضان قال من شاء صام ومن شاء أفطر