In both Hinduism and Buddhism the elephant is seen as a holy animal, and its likeness is represented in the form of many gods. The elephant is not worshipped directly but indirectly for their qualities that people wish to emulate.
Elephants are a powerful role model for many people in their spiritual lifestyle because they are obedient towards their leader, they have a steadfast nature about them because they are unstoppable once set on a path, and they have large ears that are used to listen much more so than to speak.
In Buddhism the elephant holds a deep spiritual significance but it differs from Hinduism. When Siddhartha Gupta, Buddha’s mother, was pregnant with him she dreamt of a pure white elephant that bent down and presented her with a beautiful white lotus from his trunk. After he then proceeded to circle around her three times before then entering her womb. After she woke up from this dream she knew that this dream was indicative of a divine omen.
So even at his inception, Buddha was beautifully linked to the elephant.
Elephants are gentle giants and while extremely strong and powerful, unless provoked, they have a very low key temperament. They could easily be destructive if they wanted to be but that is not in their nature. They have a quiet confidence and power about them, and while they could dominate, they prefer to be peaceful and calm.
The Earth is supported and guarded by mythical World Elephants at the compass points of the cardinal directions, according to the Hindu cosmology of ancient India. The classical Sanskrit literature also attributes earthquakes to the shaking of their bodies when they tire. Wisdom is represented by the elephant in the form of the deity Ganesh, one of the most popular gods in the Hindu religion's pantheon. Sometimes known as Ganesha, this deity is very distinctive in having a human form with the head of an elephant. This was put on after the human head was either was cut off or burned, depending on the version of the story from various Hindu sources. Lord Ganesha's birthday (rebirth) is celebrated as the Hindu festival known as Ganesha Chaturthi. Sources: Wikipedia and 🙏🕉🐘