A question of morality and place of action

Excuse the thread title, I feel it’s poorly worded

Hi, I hope this thread doesn’t seem out of place. I know it doesn’t necessarily seem like it has anything to do with religion, but from me the question is asked within a paradigm involving some kind of divine intervention - but feel free to answer/think about it without god or intervention.

My question is: Is the act of not doing something “wrong” or “evil” out of the fear punishment any better than doing the act itself?

An excerpt from Autobiography of a Yogi has just come to mind:

"A rude mosquito entered the idyl and competed for my attention. As it dug a poisonous hypodermic needle into my thigh, I automatically raised an avenging hand. Reprieve from impending execution! An opportune memory came to me of one of Patanjali?s yoga aphorisms?that on ahimsa.

?Why didn?t you finish the job??

?Master! Do you advocate taking life??

?No; but the deathblow already had been struck in your mind.?

?I don?t understand.?

?Patanjali?s meaning was the removal of desire to kill.? ? ?This world is inconveniently arranged for a literal practice of ahimsa. Man may be compelled to exterminate harmful creatures. He is not under similar compulsion to feel anger or animosity.?

Paramahansa Yogananda, in Autobiography of a Yogi"

Haha, as I continued to write this post and talk about the context of the reason I asked the question (I’ve been told a secret and although I knew I would keep it, the mental narratives of telling others this secret still ran in my head)

after sitting with it a bit more and reading the expert above I’ve found my answer. I’ll leave this thread instead of deleting it in case it evokes something in others.