We each decide what our purpose is. But I believe this is the ultimate purpose.
Ecclesiastes 12 12-13
But, my child, let me give you some further advice: Be careful, for writing books is endless, and much study wears you out.
That's the whole story. Here now is my final conclusion: Fear YHWH and obey his commands, for this is everyone's duty