Other than Bhagawan , No one truly knows the inner workings of karma.
A Punya Karma planted in the previous life might still not sprout in this life , while a Paapa Karma planted earlier in this life might sprout later in the very life to bring about Dukha and Sankata.
They can be vice versa too. Someone whom you know to be corrupt and evil in this life might be experiencing the Sukha ( pleasure ) that have sprouted from the punya karma of his last life, while his seemingly endless Paapa he is committing in this life doesnt seem to have any repurcussions.
Other than the mechanistic view of Karma some philosophies portray , many thiestic ones say , only Bhagawan decides which Karma fructifies when.
The 2 most common ways to deal with it is 1) Surgically removing them via Yogic Techniques that involve the Kundalini 2) A State of Sharanagati with your Istha where you dedicate the fruits of all your actions at their feet.
None of this is easy.
King Janamejaya has asked about Karma to the Great Sage Suta in the Devi Bhagavata for which he has mentioned :
O King! How very strong is that Fate can easily be judged by the following. The Pāṇḍavas were born in forest; then they went their own homes. They performed the Great Rājasūya Sacrifice by virtue of their own strength. After this they had to suffer their exiles in forest a much greater and more terrible hardship indeed!
Next Arjuṇa performed a very hard asceticism when the Devas became pleased and granted him an auspicious boon. Still he could not extricate himself from the hands of the terrible hardship; nowhere could be found the fruits of the merits acquired in the past when he was afterwards remaining in exile in his human body in the forest!
The severe tapasyā that he did in the Vadarikāsrama in his past incarnation as Nara, the son of Dharma, did not bear any fruit in his Arjuṇa birth. Mysterious and inexplicable are the ways and means of Karma with which the bodies of the several beings are concerned.
How could men get an idea of it when the Devas themselves are at a loss to solve it. Bhagavān Vāsudeva had to take birth in the prison, a very critical and dangerous place; he was then carried by Vasudeva to the milkman Nanda’s abode at Gokula; he remained there eleven years and thence came back to Mathurā where he killed by force Kaṃsa, the son of Ūgrasena.
Then he released his sorrowful father and mother from the bonds of prison and made Ūgrasena, the King of Mathurā. Afterwards he went to Dvārkā city, out of the fear of Kāla Yavana, the King of the Mleccas; thus Janārdana Kṛṣṇa performed many great and heroic deeds, being impelled by Fate.
Then he left his mortal coil at Prabhāsa, a place of pilgrimage, along with his relatives and acquaintances and then ascended to his Vaikunṭha abode. All the Yādavas, sons, grandsons, friends, brothers, sisters and ladies of the houses all died under the curse of a Brāhmin.
O King! I have thus described to you the inexplicable ways of Karma. What more shall I say than the fact that Vāsudeva was killed by the arrows of a hunter!
– Karuppan Thunai
( excerpt from Devi Bhagavata by Swami Vijñanananda )