Virtues of Madinah
It is not obligatory for a person to go to Madinah when they go for Hajj or Umrah, however, it is highly recommended and there are many virtues of going to Madinah.
The Messenger of Allah ﷺ said:
“One prayer in my mosque is better than one thousand prayers elsewhere, except al-Masjid al-Haraam, and one prayer in al-Masjid al-Haraam is better than one hundred thousand prayers elsewhere.”Ahmad, Ibn Majah
The Prophet ﷺ:
“No journey should be made to visit mosques except for three: this mosque of mine (Masjid Nabawi in Madinah), al-Masjid al-Haraam (Makkah) and al-Masjid al-Aqsa (in al-Quds/Jerusalem)”