The Infinity Stones in both films act as symbols for absolute power and “too much of a good thing”. Alone, the stones have great uses for the universe, but combined, it is far too much power for a single being to wield. We see this represented by both Thanos’ arm becoming inoperable in the beginning of Avengers: Endgame and then again later in the film when both the Hulk (Bruce Banner) and Ironman (Tony Stark) are badly injured and killed respectively by trying to use all six stones at the same time.
The main myths in the two films have to do with the six infinity stones, their origins, locations, and abilities. The six stones are; soul, power, reality, time, space, and mind. Each stone has its own story, who it has belonged to, where it has been, etc. In the films they state that the stones were created eons ago by “cosmic entities” known in the comics to be called “celestials”. Each stone had a use separately from the others, but it is when they all come together to be used in unison that the ultimate source of power is really seen.
Myth to do with stones or gems appears in many different types of religion. They can be seen as legendary artifacts that have a number of different mystic powers including healing properties and to grant the owners wishes. The Japanese have a myth similar to that of the infinity stones called kanju and manju which are said to grant the owner of the jewels control over the tides (Hargitai) and the ancient Maya had the myth that there were gemstones that could harness power over the elements. (Hargitai).
Myth has been said to symbolically represent the beliefs, priorities, and prejudices of a community. In the case of the MCU films, the stones represent Thanos’ craving for absolute power and the Avengers' need for a harmonious universe once again.
The Infinity Stones
The destroyed Infinity Gauntlet after the snap
Tony Stark before he dies due to the power of using the stones
The Hulk injuring himself while trying to use the stones