Mughira bin Shuba reported,

When I arrived in Najran, the people there questioned me, saying, "You recite, 'Sister of Harun,' yet Musa lived so many years before Isa."When I returned to the Messenger of Allah ﷺ, I asked him about this. He replied, "They used to name their children after their prophets and the righteous people who came before them."

Muslim 5598

Sahih

حدثنا أبو بكر بن أبي شيبة ومحمد بن عبد الله بن نمير وأبو سعيد الأشج ومحمد بن المثنى العنزي واللفظ لابن نمير قالوا حدثنا ابن إدريس عن أبيه عن سماك بن حرب عن علقمة بن وائل

عن المغيرة بن شعبة قال

لما قدمت نجران سألوني فقالوا إنكم تقرءون يا أخت هارون وموسى قبل عيسى بكذا وكذا فلما قدمت على رسول الله ﷺ سألته عن ذلك فقال إنهم كانوا يسمون بأنبيائهم والصالحين قبلهم

مسلم 5598صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Etiquette
Chapter
Prohibition of using Abu Qasim as a kunyah and explanation of recommended names
Numbering
Darussalam 5598
Muslim 5598