All such happens in case of humans due to their limited mind power & limited spiritual power. But God who is having unlimited or infinite mind power, spiritual power & is able to know all that has happened in the past, all that is happening in the present, and all that shall happen in future. God is almighty, supreme & is having all such powers. In fact He Himself is Time & all aspects of Time i.e. Past, Present & Future, all happens in Himself only. In this aspect God is called TriKalagya or TriKaldarshi or one who knows everything about past, present & future. So, as no human being is having any such power that he can know all about what has happened in the past (in their past lives) & what shall be happening in the future but all such is possible with God's case. In Bhagwat Gita Lord Krishna is saying this with full Authority in below verse.
bhavisyani cha bhutani
mam tu veda na kaschana" (Bhagwat Gita: Chapter Seven verse 26)
"Sri Krishna said: O Arjuna, as the Lord of the universe, I know everything that has happened in the past, all that is happening in the present, and all things that are yet to come. I also know all living entities; but Me no one knows."
So let's pray to such a God so that He can take care of our Present & Future as He has all the powers to play with Time & do all the changes in it at His will. Once we are able to pray to God in such a way, then He shall always protect us, which is told in below verses of Bhagwat Gita.
ye janah paryupasate
yoga-ksemam vahamy aham" (Bhagwat Gita: Chapter Nine verse 22)
"Sri Krishna said: But those who always worship Me with exclusive devotion, meditating on My transcendental form—to them I carry what they lack, and I preserve what they have."
mam ekam saranam vraja
aham tvam sarva-papebhyo
mokshayisyami ma suchah" (Bhagwat Gita: Chapter Eighteen verse 66)
"Sri Krishna said: O Arjuna, Abandon all varieties of religion or Setting aside all meritorious deeds, just surrender unto Me. I shall liberate you from all sins. Do not fear."
"Jai Sri Krishna"