The consciousness of the brain gives us the ability of self-awareness and to experience our existence.
People who don't believe in souls or afterlife are often asked this question. What happens when we die and where does the soul go?
Well, the simple answer to this question is that there is no such thing as a soul. It's the consciousness of our brain that gives us the ability to experience our existence and be self-aware. The degree of self-awareness also depends on the capacity of the brain function. For example, the human brain has developed to such an extent over the course of millions of years that we are one of the finest self-aware creatures on earth.
Any creature with a brain would have some degree of self-awareness and also some degree of experiencing its existence. Living things like plants or microbes don't have the capacity of self-awareness because they lack a functioning brain to give them this experience.
On the other hand, humans, animals, and even insects have this function to some degree depending on how much their brains have developed in the evolutionary process of life on earth. Insects do have a brain and also have a considerable ability to memorize. The brain in insects actually controls only a small subset of functions required for an insect to live. The stomodaeal nervous system and other ganglia can control most body functions independent of the brain.
In fact, an insect can live for several days without a head, assuming it, upon decapitation does not lose a lethal amount of hemolymph which is the insect equivalent of blood. So the function of the brain is different in different species.
Now coming back to the concept of soul and death, so what happens after death? Well, nothing happens. Your heart stops pumping and the brain dies because of the lack of blood supply. All that remains is a decomposing biochemical mass of tissue and bones. And with that, your consciousness and your ability to experience life and to use your senses are gone indefinitely.