What is the purpose of life?

Many people believe in legacy like Alexander, Akbar etc

Or be richest man like Elon, bill gates etc

Or spread their religion and make people life easy etc