People have asked this question, and writers and speakers have shared their opinions on what they think is so. But how would they know? Since they would have had to be you to live the same life as you, to be able to tell you your purpose in life. No one knows your future, your future mistakes, pursuits of education and career[s], joys, sorrows, friendships, physical and mental health issues, companionships, lifesaving and changing moments, and life's accomplishments as such that are still yet to come.
According to God, your purpose in life is to live in Peace on Earth.
God wants you to try His Will, His Will of God, His Will to help you live in Peace. He wants humans to live in Peace among each other, especially when mistakes happened in life, which could cause them to harass, imprison, torture, commit acts of violence, kill, and or cause them to die by suicide. God's Will will help you to live in Peace, and it will help you to accept/forgive whomever/whatever is to come/happen.