Question:
Does Islam allow getting married in the month of Muharram or Safar?
Fatwa:
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad
is His Slave and Messenger.

Marriage is lawful at any day of the year and there is no any evidence in the Sharia that supports the opinion in your question. Rather, such an opinion is a form of falsehood.
A Muslim is not allowed to listen to false impressions and doubts, that are circulated among the mob.
In this vein, the Prophet
said: “There is neither infection nor ill omen.” [Imaam Al-Bukhari and Muslim] "An ill omen is a form of Shirk". Reported in the books of al-Sunan. This means that choosing some day or month does not change al-Qadr (divine destiny), which brings bad or good.

Allah Knows best.