From Sahih Bukhari (Hadith 2001):
Narrated `Aisha:Allah's Messenger (ﷺ) ordered (the Muslims) to fast on the day of 'Ashura', and when fasting in the month of Ramadan was prescribed, it became optional for one to fast on that day ('Ashura') or not
Reference: Bukhari 2001