Doing the best that you can, is not a protection against wrong-doing.
Why? Ignorance, or the lack of Right View and wisdom, may cause you to commit wrong-doing, despite doing "the best that you can".
Hence, gaining Right View, and gradually improving Right View and wisdom over time, through insight, will push the boundaries of your "best effort".
In the Salt Crystal Sutta (translated by Thanissaro Bhikkhu), the Buddha taught:
'Now, a trifling evil act done by what sort of individual is
experienced in the here & now, and for the most part barely appears
for a moment? There is the case where a certain individual is
developed in the body, developed in virtue, developed in mind [i.e.,
painful feelings cannot invade the mind and stay there], developed in
discernment: unrestricted, large-hearted, dwelling with the
immeasurable. A trifling evil act done by this sort of individual is
experienced in the here & now, and for the most part barely appears
for a moment.
And there you have it. For protection from wrong-doing, one should be developed in body, developed in virtue, developed in mind, developed in discernment and dwelling in the immeasurable.
The same paragraph translated by Bhikkhu Sujato here:
What kind of person does the same trivial bad deed, but experiences it
in the present life, without even a bit left over, not to speak of a
lot? A person who has developed their physical endurance, ethics,
mind, and wisdom. They’re not small-minded, but are big-hearted,
living without limits. That kind of person does the same trivial bad
deed, but experiences it in the present life, without even a bit left
over, not to speak of a lot.