Karyam karma is a general word and can mean anything from the work at hand to the duty assigned.
Kartavyam karma is very specific. Though often mistaken for social and other duties, the Gita evidently uses it in quite another sense. It is the work dictated by our inner nature, swadharma, and/or given/inspired from Above by the Divine. Sri Aurobindo defines it thus:
‘…..it is the action demanded from above and from within us, kartΔvyaαΉ karma.’
(Ref. https://incarnateword.in/cwsa/19/the-gunas-mind-and-works#p5)
Affectionately,
Alok Da


