What should you do when you are undecided in the perspective of Islam? Well, you should pray istikhara.
the prophet (saw) in a Hadith that reported by Jabber (ra); He (peace be upon him) said if anyone of you has a serious concern on their mind meaning if you’re going to make a important decision about something then make istikhara and istikhara is to pray two special units meaning separate/ different not alongside any other prayer.
the short dua of istikhara
Allahuma khirli wakhtarli
O Allāh, grant me goodness, and choose for me. (At-Tirmidhī)
The long dua of istikhara :
The method of istikhārah is to perform two rak’āt at any time of the day, other than the times when nafl salāh is forbidden. It is preferable to recite Sūrah Al-Kāfirūn in the first rak’ah and Sūrah Al-Ikhlās in the second. Thereafter one should praise Allāh ta’ālā, send salāh upon the Prophet sallallāhu ‘alayhi wasallam and then recite the following du’ā
Allāhumma innī astakhīruka biʿilmika wa astaqdiruka biqudratika, wa asʾaluka min faḍlika (a)l-ʿaẓīm fainnaka taqdiru walā aqdiru wa taʿlamu wala aʿlamu wa anta ʿallāmu (a)l-ghuyūb. Allāhumma, in kunta taʿlamu anna hadha (a)l-amra [mention decision here] khayrun lī fī dīnī wa maʿāshī waʿāqibati amrī faqdurhu lī wa ya (a)s-sirhu lī thumma barik lī fīhi. Wa in kunta taʿlamu anna hadha (a)l-amra sharrun lī fī dīnī wa maʿāshī wa ʿāqibati amri faṣrifhu ʿannī wa (a)ṣrifni ʿanhu waqdir lī(ya) (a)l-khayra haythu kāna thumma arḍīnī bihi.
O Allāh! I seek goodness from You, through Your Knowledge, and I seek strength through Your Power and ask for Your great Bounty, for You are able to do things while I am not, and You know while I do not; and You are the Knower of the Unseen. O Allāh, if You know that this matter [name your matter] is good for me, in respect to my Dīn, my worldly life and the consequence of my affairs, then decree it for me and make it easy for me, and then grant me barakah in it. And if You know that this matter [name your matter] is bad for me in respect to my Dīn, my worldly life and the consequence of my affairs, then turn it away from me and turn me away from it, and decree for me what is good, wherever it may be, and make me be pleased with it. (Al-Bukhārī)
Istikhara is the idea of asking Allah for the best choice that is in front of you.
In fact the prophet (saw) said when any one of you is concerned about an issue i,e any issue, any significant decision in your life, you can make istikhara for.
istikhara doesn’t mean that your choice that you make will be Problem free. That is just a false Understanding.