This is called a simile or also called a Synonym!
A simile or Synonym is a figure of speech involving the comparison of one thing with another thing of a different kind, used to make a description more emphatic or vivid (e.g., as brave as a lion, crazy like a fox ).
Hope I helped!