the term that refers to the belief that the spirits of past generations are present in nature, objects, or people is: Animism
In animism, you believe that every objects near your environment have some sort of souls that could influence your life, which is why animism practice often involve giving gift or praying to inanimate objects.