The Messenger of Allah ﷺ said, "The orphan girl is to be consulted regarding herself. If she remains silent, that is her consent, and if she refuses, no marriage may be imposed upon her." The wording is from the narration of Yazid.
حدثنا أبو كامل حدثنا يزيد يعني ابن زريع ح و حدثنا موسى بن إسمعيل حدثنا حماد المعنى حدثني محمد بن عمرو حدثنا أبو سلمة
قال رسول الله ﷺ تستأمر اليتيمة في نفسها فإن سكتت فهو إذنها وإن أبت فلا جواز عليها والإخبار في حديث يزيد
Its isnad is hasan.Ahmad narrated it, 2/384, from the hadith of Hammad bin Salama, with the same wording. Tirmidhi also narrated it, no. 1109, and Nasai, no. 3272. Tirmidhi said, "Hasan," and Ibn Hibban graded it sahih, no. 1239, 1240.