The Prophet (ﷺ) said, "A woman should not travel for more than three days except with a Dhi-Mahram (i.e. a male with whom she cannot marry at all, e.g. her brother, father, grandfather, etc.) or her own husband.)"
Sahih al-Bukhari Book 18, Hadith 7