A special thanks to the Website Hadith of the Day for providing most of this article (https://hadithoftheday.com/how-to-perform-salat-l-istikhara/)
The Istikhara (Guidance) Prayer is to be performed when you are planning to make a certain decision, and you want Allah’s help in making the right choice. You simply pray two rakats of Istikhara prayer (as you normally would pray 2 rakats), and then after the prayer make the following duaa:
Allahumma inni astakhiruka bi ‘ilmika, Wa astaqdiruka bi-qudratika, Wa as’alaka min fadlika al-azim Fa-innaka taqdiru Wala aqdiru, Wa ta’lamu Wala a’lamu, Wa anta ‘allamu lghuyub. Allahumma, in kunta ta’lam anna hadha-l-amra Khairun li fi dini wa ma’ashi wa’aqibati amri (or ‘ajili amri wa’ajilihi) Faqdirhu wa yas-sirhu li thumma barik li Fihi, Wa in kunta ta’lamu anna hadha-lamra shar-run li fi dini wa ma’ashi wa’aqibati amri (or fi’ajili amri wa ajilihi) Fasrifhu anni was-rifni anhu. Waqdir li al-khaira haithu kana Thumma ardini bihi.
O Allah! I ask guidance from Your knowledge, and power from Your Might and I ask for
Your great blessings. You are capable and I am not. You know and I do not and You know the unseen. O Allah! If You know that this matter is good for my religion and my subsistence and in my Hereafter–(or said: If it is better for my present and later needs)–then You ordain it for me and make it easy for me to get, and then bless me in it, and if You know that this matter is harmful to me in my religion and subsistence and in the Hereafter–(or said: If it is worse for my present and later needs)–then keep it away from me and let me be away from it. And ordain for me whatever is good for me, and make me satisfied with it. The Prophet added that then the person should name (mention) his need. (Sahih Al-Bukhari – Book 21 Hadith 263)
When making the dua, the actual matter or decision should be mentioned instead of the words “hathal-amra” (“this matter”). What needs to be noted is that the answer to one’s istikhara prayer does not come simply in the form of dreams and feelings but in how Allah facilitates and unfolds events for an individual after he or she genuinely strives to do what is best.
Take the most effective means, which includes consulting those whose knowledge and wisdom one has confidence in, and place your trust in Allah.
Lastly, one needs to be patient in terms of receiving the answer to their prayers.
Remember the words of our Prophet (pbuh), “The supplication of everyone is granted as long as he does not show haste and does not say that he made a supplication but it was not accepted.” [Abu Dawud, Tirmidhi, Ibn Majah]