Worship of the One True Almighty God of the Universe [Allah in Arabic] as a primary goal or aim in life provides a believer with everything he needs to succeed in both this life and the Next Life.
The word for total surrender, submission, obedience, purity of heart and peace in the Arabic language is "Islam". Those who try to perform these actions are called "MU-slims" [Islam-ERs].
To a Muslim the whole purpose of life is "ibadah" or worship to the One True Almighty God on Terms and under His Conditions.
The term "worship" to a Muslim includes any and all acts of obedience to Almighty Allah.
So his purpose of life is a standing purpose; Worshipping Allah by accepting Allah's Will over his own.
This act of ibadah [worshipping, thanking and extolling the Greatness Almighty Allah on His Terms and Conditions] is for the Muslim, throughout his whole life regardless of the stage. Whether he is a child, adolescent, adult or aged person, he is seeking after the Will of the Almighty in all these stages.
His life here on earth although short, is full of purpose and is totally meaningful within the complete framework of total submission [Islam].
Because Islam teaches that this life is only a test or trial for the individual to show him his true nature it is only natural that he would accept death as not so much an ending to everything but more as a beginning of the final and lasting life in the Hereafter.
Life started on the earth when Allah first created the earth and filled it with water, air, different types of food, and what its inhabitants need from clothing, residence, medicine and other things, i.e. He prepared everything man needs, then God created the first man who is Adam from the elements of the earth, then He breathed in him from His spirit and created Eve from him. After He lodged them in paradise to see different types of favor and bounties God prepared for righteous people from his offspring, He willed that they come down to the earth to inhabit it.
So the aim of their life on the earth was to dwell it by what Allah likes of useful deeds, good morals and good dealings, they also breed and propagate and teach their children and grandchildren to keep and fulfill their covenant to God by obeying Him, remembering Him, being thankful to Him and worshiping Him properly. Whoever keeps to this, he is the guided and the happy one, God makes his life a good one and makes him happy in the hereafter by His favor in paradise. And whoever disobeys Him and follows his desires and wishes spoiling and corrupting in life and destroying crops and cattle though he knows that God doesn’t like mischief, such man is a disbeliever in God’s bounties and not keeping his covenant to God, so God despises him, scorns him and gets him in Hell on the Day of Judgment to face torture as he is a disbeliever and ungrateful.