In a song or music, there may be a piece of catchy melody that once you hear, you immediately recognise which song it is from. Here is a situation where you might want one: in a game where a cut of a piece of music is played and you need to guess the name of the music, the catchy melody mentioned above is what we all want.
Is there any word for this kind of melody in a piece of music?
It is possible that you are looking for the word hook.
A hook is a musical idea, often a short riff, passage, or phrase, that
is used in popular music to make a song appealing and to "catch the
ear of the listener". The term generally applies to popular music,
especially rock, R&B, hip hop, dance, and pop. In these genres, the
hook is often found in, or consists of, the chorus. A hook can be
either melodic or rhythmic, and often incorporates the main motif for
a piece of music.