Abdullah bin Amr bin As reported,

He heard the Messenger of Allah ﷺ say, "The hearts of the children of Adam are all between two of the fingers of the Most Merciful, as a single heart, which He turns however He wills."Then the Messenger of Allah ﷺ said, "O Allah, Turner of hearts, turn our hearts toward Your obedience."

Azami 1069

Sahih

عن عبد الله بن عمرو بن العاص قال

إنه سمع رسول الله ﷺ يقول: إن قلوب بني آدم كلها بين أصبعين من أصابع الرحمن كقلب واحد، يصرفه حيث يشاء. ثم قال رسول الله ﷺ: اللهم مصرف القلوب صرف قلوبنا على طاعتك.

الأعظمي 1069صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
Allah turns the hearts as He wills
Numbering
Jami al-Kamil 1069 (2nd edition)
Azami 1069