After the Upanishads & the Bhagavadgita, the Srimad Bhagavatham is the most authoritative of the Hindu scriptures. It was supposedly composed by Vyasa & taught to his son Suka. Suka narrated it to King Parikshit under special circumstances.
King Parikshit, while hunting, saw a meditating Sage Samika. Being thirsty, the king asked for water. The absorbed sage didn't reply. This perceived neglect enraged the king, who picked up a dead snake lying nearby, hung it round the sage's neck & went away. The sage's son Sringi, returning saw the indignity to his father, & learning the reason, cursed the King Parikshit to die of snake bite in a week. Here one can see the king's karma catching up with him. It can also be viewed as a generalised aspect of Newton's third law, which states that action & reaction are equal & opposite.
The king also came to know of the curse, & thought of a Bucket List of only one item, listening about the glories of God. (Here it may be mentioned in passing that Thomas a Kempis, William Law, Julian of Norwich & Rabia of Basra among others also had the same one item Bucket List.) He approached Suka & asked for guidance, who recited Srimad Bhagavatham to him. It contains stories of Lord Krishna's life, other related Stories & most importantly, Krishna's last message to his disciple Uddhava, known as "Uddhava Gita", an advanced spiritual text.
As the recitation came to an end, the allotted week also ended, & despite all precautions, a snake entered & bit the King, completing the cycle of Karma.