The Prophet ﷺ said, "A person follows the religion of his close friend, so let each of you consider carefully whom he takes as a close friend."
حدثنا ابن بشار حدثنا أبو عامر وأبو داود قالا حدثنا زهير بن محمد قال حدثني موسى بن وردان
أن النبي ﷺ قال الرجل على دين خليله فلينظر أحدكم من يخالل
[Its isnad is hasan] Tirmidhi transmitted it, Zuhd, chapter on the hadith "A man follows the religion of his close friend," H: 2378, from Muhammad bin Bashshar with this wording, and said, Hasan gharib, and the hadith has corroborating narrations.