There are 2 different things, anyone who becomes famous does not just crave for fame but they do something good so they become famous. Like if you have a passion to paint and you do a very good painting, automatically you become famous. But if you want to paint only to become famous then you become a failure.
Anyone who does something creative or useful or invents something which is good for the society automatically becomes famous.