The pen has dried with everything that will exist until the Day of Resurrection; whatever bypassed a servant was never going to reach him, and whatever reached him was never going to bypass him.
This is the very meaning of faith in the divine decree and predestination: to know that nothing will touch you except what Allah has already written for you; whatever has afflicted you could never have missed you, and whatever has missed you was never meant to befall you.
So when a calamity you dislike strikes, you recognize that it was inscribed in the Preserved Tablet and had to occur. That awareness consoles you against panic and resentment and affirms your faith in Allah.
Likewise, whatever eludes you was never destined for you. Should you pursue something ardently, exhausting every effort and resource yet still fail to obtain it, then—after taking the means—you submit to the decree, free from agitation, misgivings, and anxiety. The Prophet ﷺ said: “Be keen on what benefits you, seek help from Allah and do not lose heart. If something befalls you, do not say, ‘If only I had done such-and-such it would have been this way or that,’ but rather say, ‘Allah decreed it, and whatever He wills He does,’ for ‘if only’ opens the door to the work of Satan.” (1)
With this understanding, matters become easy for you: no panic, no regret. All affairs are in His hand, glorified be He. Yes, you must take the means and strive for what benefits you, but the outcomes come from Allah alone—and you do not know where the true good lies.