The Gita emphasizes that it is better to perform your own duty poorly than to perform another's duty perfectly. Purpose is found at the intersection of your natural skills (Gunas) and the needs of society (Loksangraha).
It is better to do your own duty, even if imperfectly, than to do another's duty perfectly.
By performing one's natural work, one worships the Creator and attains perfection.
A gifted teacher who tries to become a software engineer just for the money will feel purposeless. Their 'Swadharma' is teaching. True purpose is aligning your inner compass with your outer actions.