Istikhara means seeking the guidance of Allah subhanahu wata’ala in a certain matter what do. We say at the end of that supplication; we say oh Allah if You know that this is not good for me, it’s not good for my deen, it’s not good for my faith, for my present, and for my future then keep it away from me; create a barrier between that and myself.
The prophet sallallahu alaihi wasallam says, “The affairs of a true believer are amazing because when goodness comes in his or her direction, he or she is thankful. It’s better for him / her and when difficulty and hardship comes in his or her direction he or she bears patience that is better”,