Whoever told you that memorizing music is easy lied, and no, it’s not like learning a song. When you listen to a song repeatedly, it sticks to your mind like a fly trap. So you remember the lyrics, notes, and chorus, even if you didn't try to memorize anything.
That’s because you listen to it for fun or to enjoy it, so your mind doesn’t treat it as a task. When you start memorizing music for a learning purpose, your mind will close up as it does on exams.
So, try not to dwell a lot on memorizing piano music. It’s a challenging task, and it’ll take some time. Give yourself all the time you need, and don’t pressure your mind into listening to the same piece again and again to memorize it.
In fact, memorizing music may be the hardest part of learning piano. It’s an essential part, too, because it lets you play your pieces without stopping every few seconds to refresh your memory.
If you give it enough time, you’ll eventually memorize everything you need in a short time. Like all skills, it takes practice.