The Fast of the 10th of Muharram
It is narrated in Sahih Bukhari that Ibn Abbas (may Allah be pleased with him) reported that when the Prophet Muhammad (peace be upon him) arrived in Madinah, he saw the Jews fasting on the day of Ashura (10th of Muharram). He asked them about it, and they replied that it was a great day on which Allah saved the Children of Israel from their enemy (Pharaoh). Prophet Musa (Moses) (peace be upon him) fasted on this day as gratitude to Allah. Upon hearing this, the Prophet Muhammad (peace be upon him) said, “We have more right to observe fast on this day than you,” and he himself fasted on that day. He also ordered the Companions to fast on the day of Ashura.
In Sahih Muslim, it is narrated from Abu Hurairah (may Allah be pleased with him) that the best fast after the month of Ramadan is fasting on the day of Muharram (10th of Muharram), and the best prayer after the obligatory prayers is the night prayer (Tahajjud). Whenever the day of Ashura would come during the lifetime of the Prophet Muhammad (peace be upon him), he would fast on that day. However, before his death, when the next year’s Ashura came, the Prophet (peace be upon him) passed away. Nevertheless, because the Prophet (peace be upon him) had given instructions regarding fasting on the day of Ashura, the Companions continued to observe fasting on the 9th and 10th of Muharram, and they also added an optional fast on the 11th of Muharram. This practice was considered recommended (Mustahabb), and fasting only on the day of Ashura alone was considered Makruh Tanzihi (disliked but not sinful).
From the guidance of Prophet Muhammad (peace be upon him) in this matter, we learn an important lesson that he did not approve of imitating non-Muslims, even in matters of worship. Although this similarity was not in any evil or unlawful act but was in an act of worship, i.e., fasting on the same day as they did, the Prophet (peace be upon him) did not approve of it. Why? Because the religion that Allah has bestowed upon the Muslims is distinct from all other religions.
When the Prophet (peace be upon him) did not approve of similarity even in acts of worship, devotion, and goodness, how bad it would be if Muslims imitated them in their actions. If this similarity is adopted with the intention of appearing like them, it would be a major sin (Gunah-e-Kabira).
https://pk.islamteaching.com/fasting-ninth-tenth-muharram/