Messenger of Allah ﷺ 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.
كَانَ رَسُولُ اللَّهِ ﷺ أَمَرَ بِصِيَامِ يَوْمِ عَاشُورَاءَ فَلَمَّا فُرِضَ رَمَضَانُ كَانَ مَنْ شَاءَ صَامَ وَمَنْ شَاءَ أَفْطَرَ