Bhagavad Gita · 6.26
यतो यतो निश्चरति मनश्चञ्चलमस्थिरम्।ततस्ततो नियम्यैतदात्मन्येव वशं नयेत्॥
yato yato niśhcharati manaśh chañchalam asthiram tatas tato niyamyaitad ātmany eva vaśhaṁ nayet
Wherever the restless and unsteady mind wanders, one should bring it back and direct it to the Self alone.
— Bhagavad Gita 6.26
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)