All and everything is the qadr (decree) of Allah. No but or if I had done this or done that. The Prophet Muhammad (Peace & Blessings Be Upon) said: “Seek the help of Allah and do not succumb to feebleness. An when an affliction strikes you, say ‘Allah has decreed this, and He does as He wills.’ Do not say, ‘Had I done this or that, this or that would have happened’, because ‘if’ opens the door wide for the work of Ash-Shaytan.” – [Shahih Muslim] Always turn to Allah and continuously ask for whatever it is you want. The Prophet Muhammad (Peace & Blessings Be Upon Him) said: “The closest that a servant is to his Lord is when he is in prostration.” [Shahih Muslim] So ask Allah as when you are closest to Him in sujood. If it goes your way, it was meant to be no matter what. Nothing would have changed it because that is the decree of Allah and if it didn’t go your way, it won’t and nothing won’t change it either because that is the decree of Allah also.
Maybe what you wanted to happen didn’t and saved you from a calamity or hardship. Be thankful for now. Others may want the position you have now and you aren’t thankful and others have less and are thankful. Alhumdulilah (Thanks to Allah) for everything. Be happy!! Always do what is best and is permissible. InshaAllah… Allah knows best.