Sigmund Freud said this quote

As regards intellectual work it remains a fact, indeed, that great decisions in the realm of thought and momentous discoveries and solutions of problems are only possible to an individual, working in solitude.