Gautama Buddha said this quote

Hard to restrain, unstable is this mind; it flits wherever it lists. Good it is to control the mind. A controlled mind brings happiness.