وَقَالَ يَـٰبَنِىَّ لَا تَدْخُلُوا۟ مِنۢ بَابٍ وَٰحِدٍ وَٱدْخُلُوا۟ مِنْ أَبْوَٰبٍ مُّتَفَرِّقَةٍ ۖ وَمَآ أُغْنِى عَنكُم مِّنَ ٱللَّهِ مِن شَىْءٍ ۖ إِنِ ٱلْحُكْمُ إِلَّا لِلَّهِ ۖ عَلَيْهِ تَوَكَّلْتُ ۖ وَعَلَيْهِ فَلْيَتَوَكَّلِ ٱلْمُتَوَكِّلُونَ
Asad Quran Translation
And he added: "O my sons! Do not enter [the city all] by one gate, but enter by different gates.65
Yet [even so,] I can be of no avail whatever to you against [anything that may be willed by] God: judgment [as to what is to happen] rests with none but God. In Him have I placed my trust: for, all who have trust [in His existence] must place their trust in Him alone."
Probably in order not to attract undue attention in the foreign land and possibly fall prey to intrigues. See in this connection note  below.
Malik Quran Translation
Then he said; "My sons! Do not enter the capital city of Egypt through one gate, enter from the different gates. Not that I can avail you aught against Allah; this advice is just a precaution, because none can accurately judge except Allah. In Him do I put my trust and in Him let all the reliant put their trust."
Yusuf Ali Quran Translation
Further he said; "O my sons! enter not all by one gate: enter ye by different gates. Not that I can profit you aught against Allah (with my advice): none can command except Allah: on Him do I put my trust and let all that trust put their trust on Him." 1730
The Commentators refer to a Jewish or Eastern custom or superstition which forbade members of a numerous family to go together in a mass for fear of "the evil eye". But apart from East or West, or custom or superstition, it would be ridiculous for any large family of ten or eleven to parade together in a procession among strangers. But there was even a better reason in this particular case, which made Jacob's advice sound, and Jacob was, as stated in the next verse, a man of knowledge and experience. Here were eleven strangers dressed alike, in a dress not of the country, talking a strange language, coming in a time of stress, on an errand for which they had no credentials. Would they not attract undue attention and suspicion if they went together? Would they not be taken for spies?-or for men bent on some mischief, theft, or organised crime? Such a suspicion is referred to in verse 73 below. By entering separately they would attract little attention. Jacob very wisely tells them to take all human precautions. But like a Prophet of Allah he warns them that human precautions would be no good if they neglect or run counter to far weightier matters-Allah's Will and Law. Above all, they must try to understand and obey this, and their trust should be on Allah rather than on human usages, institutions, or precautions, however good and reasonable these might be.
Mustafa Khattab Quran Translation
He then instructed ˹them˺, “O my sons! Do not enter ˹the city˺ all through one gate, but through separate gates.1
I cannot help you against ˹what is destined by˺ Allah in the least. It is only Allah Who decides. In Him I put my trust. And in Him let the faithful put their trust.”
He told them that every three or four of them should enter through a different gate. His desire was to protect them from envy and harm.
Piktal Quran Translation
And he said: O my sons! Go not in by one gate; go in by different gates. I can naught avail you as against Allah. Lo! the decision rests with Allah only. In Him do I put my trust, and in Him let all the trusting put their trust.
Waqala ya baniyya la tadkhuloo min babin wahidin waodkhuloo min abwabin mutafarriqatin wama oghnee AAankum mina Allahi min shayin ini alhukmu illa lillahi AAalayhi tawakkaltu waAAalayhi falyatawakkali almutawakkiloona