Practice and letting go
Yoga Sutra 1.12अभ्यासवैराग्याभ्यां तन्निरोधः ॥
abhyāsa-vairāgyābhyāṃ tan-nirodhaḥ ||
Translation
The mind is stilled through practice and non-attachment.
In simple words
Krishna says the same in Gita 6.35: the mind is restless, but practice and letting go tame it.