That’s what Buddhism has been trying to unravel – the mechanism of happiness and suffering. It is a science of the mind.
Meditation is not just blissing out under a mango tree. It completely changes your brain and therefore changes what you are.