In fact, these two statements have the same meaning, both from the same allusion, and both are correct. As for why there are two expressions of "human heart" and "greed", it is very simple, because in the process of spreading Chinese vocabulary, there are often examples where the lexical meaning is the same but the literal meaning has changed. "People's heart" is a general expression, and "greed" is a statement that points directly to the core.
There is also an allusion that "the human heart is not enough to swallow a snake." Once upon a time, a very poor man saved the life of a snake. In return for saving his life, the snake asked the man to make a request and satisfy his wish. At first, the man only asked for simple food and clothing, and the snake satisfied his wish. Later, greed gradually increased, and he asked to be an official, and the snake also satisfied him. Until he became prime minister, he was not satisfied and asked to be emperor. At this time, the snake finally realized that human greed is endless, so it swallowed the man in one bite. So, the snake swallowed the prime minister, not the elephant. Therefore, it left the allusion of "the heart is not enough to swallow the elephant".
As for which allusion is more accurate, this one should be more accurate with the phrase "People are insatiably greedy and swallow elephants", because after all, there is Shan Hai Jing Hai Nei Nan Jing as the source to study.
I'm glad to answer your question at the first time. If you have any questions, please ask them in time. If you are satisfied, please adopt them!