Dark mark on my soul after betrayal

What could I have done to prevent myself getting into that situation and why didn't I pay attention to logic

What could I have done to prevent myself getting into that situation and why didn't I pay attention to logic