The Messenger of Allah ﷺ had commanded the fasting of the day of Ashura. When the fast of Ramadan was made obligatory, whoever wished to fast did so, and whoever wished to break it did so.
حدثنا أبو اليمان أخبرنا شعيب عن الزهري قال أخبرني عروة بن الزبير أن
كان رسول الله ﷺ أمر بصيام يوم عاشوراء فلما فرض رمضان كان من شاء صام ومن شاء أفطر