The Messenger of Allah ﷺ had commanded fasting on the day of Ashura. When the fast of Ramadan was made obligatory, whoever wished fasted on Ashura and whoever wished did not.
كان رسول الله ﷺ أمر بصيام يوم عاشوراء، فلما فرض رمضان كان من شاء صام ومن شاء أفطر.
Bukhari narrated it in the Book of Fasting (2001), and Muslim in the Book of Fasting (115:1125), both of them through Ibn Shihab Zuhri, who said, Urwa bin Zubayr told me that Ayesha said, and then he mentioned it. The wording given here is Bukhari's, and Muslim's wording is similar.