Sigmund Freud said this quote

In his fight against the powers of the surrounding world his first weapon was magic, the first forerunner of our modern technology. We suppose that this confidence in magic is derived from the over-estimation of the individual’s own intellectual operations, from the belief in the ‘omnipotence of thoughts’, which, incidentally, we come across again in our obsessional neurotics.