The Prophet ﷺ used to teach us the istikharah for each and every matter as he used to teach us the Surahs from the Quran: ˹he said,˺ "If anyone of you intends to do something, he should offer a two-rakah prayer and then say:
allāhumma inni astakhīruka bi-ʿilmika, wa-astaqdiruka bi-qudratika, wa-asʾaluka min fadlik al-ʿaẓīm, fa-innaka taqdiru wala aqdiru, wa-taʿlamu wa-la aʿlamu, wa anta ʿallām al-ghuyūb;
allāhumma in kunta taʿlamu anna [hādhā al-amra] khayrun lī fī dīni wa-maʿāshī wa-ʿāqibati amrī," or said, "fi ʿājili amrī wa-ājilihī, fa-uqdurhu lī, wa-in kunta taʿlamu anna [hādhā al-amra] sharrun lī fī dīni wa-maʿāshī wa-ʿāqibati amrī," or said, "fī ʿājili amri wa-ʿājilihī fa-iṣrifhu ʿannī wa-iṣrifnī ʿanhu wa-uqdur līya al-khayra ḥaythu kāna, thumma raḍḍini bi-hī."
(O Allah! I seek ˹Your help˺ in making a choice through Your knowledge, and seek the ability ˹to do so˺ through Your Power, and I ask You for Your Great Blessings. For You are capable and I am not. You know ˹better˺, and I do not, and You know the ˹matters of the˺ unseen.
O Allah! If You know that [such a matter] is good for me, my religion, my livelihood, and my Hereafter..." or he said, "for my short-term ˹goals˺ as well as the long-term ˹goals˺, then ordain it for me and make its ˹path˺ easy for me and then bestow Your blessings upon it. If You know that [such a matter] is bad for me, my religion, my livelihood, and for my Hereafter..." or he said, "for my short-term ˹goals˺ as well as my long-term ˹goals˺, then remove it from ˹my path,˺ and remove me from ˹its path˺ and ˹instead˺ ordain for me good, whatever it may be, and let me be content with it.)"
and he should name his need. (in place of what is mentioned in brackets.