Praise be to Allah.
Success and guidance are in the hand of Allah (may He be glorified). Whomever Allah wills to guide, He will guide, and whomever He wills to leave stray, He leaves him astray. He is the guidance for everyone and humans will find the means to success also with his guidance.
Allah (may He be glorified) says: “That is the guidance of Allah by which He guides whom He wills. And one whom Allah leaves astray – for him there is no guide” – az-Zumar 39:23
In another verse, Allah (may He be glorified) also explain “Whomever Allah wills – He leaves astray, and whomever He wills – He puts him on a straight path” – al-An‘aam 6:39
However, when Muslims perform As Solat they recite the first verse of al-Faatihah, which translates ‘Guide us to the straight path’, at the same time they are required to take the necessary steps that lead them to Allah’s guide.
Muslims are required to initiate and adhere to the path of righteousness, be patient and steadfast. They should choose good over evil. With all that, if Muslims take the necessary steps to adhere to the rule of Allah (may He be glorified) then He will help and guide them.
As He (may He be glorified) says: “And thus We have tried some of them through others that the disbelievers might say, ‘Is it these whom Allah has favoured among us?’ Is not Allah most knowing of those who are grateful?” – al-An‘aam 6:53
A common question could be like, what effort could help a man if Allah, (may He be glorified) has decreed that he should go astray and not be guided?
Allah, (may He be glorified) says:
“And when they deviated, Allah caused their hearts to deviate” – As-Saff 61:5
This means, Allah (may He be glorified) only guide those who deserve to be guided.
As He (may He be glorified) says: “So for their breaking of the covenant We cursed them and made their hearts hard. They distort words from their [proper] usages and have forgotten a portion of that of which they were reminded” – al-Maa’idah 5:13
However, it is worth pointing out that people do not know what Allah (may He be glorified) has decreed for them, they only come to know of the decree after what is decreed has come to pass.
In conclusion, once Muslims understand that, they will be able to take their first step on the right path, and not let a single moment go by without striving in the path of Allah, may He be glorified and exalted.
They are humble towards Allah and know that in His hand are the keys of the heavens and the earth, so they feel the need for His guidance and support.
And Allah knows best.