There are many expressions commonly used in English to express similarity.
There is no magic rule to help you remember them. You just have to learn them. Sorry!
Take a look at the examples below.
To have a mind / memory like a sieve.
If someone has a mind (or memory) like a sieve, he / she finds it difficult to remember things. He / she forgets things very easily.
E.g. I know I promised to send you the details but I have a memory like a sieve and I totally forgot. Sorry!
To have a memory like an elephant.
If someone has a memory like an elephant he / she has an extremely good memory, can remember things easily and can remember things for a long time.
E.g. She has a memory like an elephant. She can tell you all the family birthdays and anniversaries without needing to check.
Have fun learning English!
Louise