What is the meaning of [All that glitters is not gold.]

Things that look good outwardly may not be as valuable or good.

Example: X: I want to be a movie star when I grow up. Y: Film industry looks good from the distance, but it has its own problems. Remember, all that glitters is not gold.