Someone’s own duty as an offering to the Lord and its performance is called Karmayoga one duty of the four varṇas (brāhmaṇas, kṣatriyas, vaiśyas and śūdras). Those duties are prescribed in the scriptures based on their nature. This renders the mind fit for knowledge. Here, Lord Kṛṣṇa makes it a point to emphasize the importance of svadharma (duty). The duties are so necessary for those who get the responsibility to do that not only for the sake of purity but for the sake of social harmony also. Shriking one’s duty can only lead to total confusion. Who is the purified seeker detached and self-controlled, will soon attain liberation through jñānayoga.
In Bhagavad-Gita, Lord Krishna makes an impact to teach his pal and also the representative all humans Arjuna about the Karma(Duty).
Writing on mythology and its best choice is Bhagavad Gita"
source: Bhagavad gita As It Is