“
Do men imagine that they will be left (at ease) because they say, We believe, and will not be tested with affliction?” (Quran, 29:2)
“
And We will surely test you with something of fear and hunger and a loss of wealth and lives and fruits, but give good tidings to the patient, who, when disaster strikes them, say, "Indeed we belong to Allah , and indeed to Him we will return." Those are the ones upon whom are blessings from their Lord and mercy. And it is those who are the [rightly] guided. (2:155-157)
I heard a sheikh once say in answer to a similar question, that people pray regularly and expect that problems should disappear and for there not to be any problems worries, or troubles, and he said that is not necessarily the case.
For example take new Muslims, often all of a sudden they find after embracing Islam that they are faced with obstacles, problems, ostracization from loved ones, isolation, discrimination etc.
Think of the new Muslims back at the time of the Prophet :saws: , think of how they were persecuted, fought against, boycotted, tortured and even killed.
Sometimes Allah tests a person He loves, to bring them closer to Him through it. Sometimes we feel low, and can’t see the wisdom in what’s happening, but Allah knows what we don’t know.
He was saying the purpose of salah isn’t to make problems disappear, and we shouldn’t expect that all of a sudden problems will, because that can dishearten people and make them leave prayer. We pray to worship Allah, and we should take whatever steps we practically can, if any, to help ourselves, and also pray and make dua to Allah and leave it in His hands. His is the ultimate wisdom.
And Allah knows best, and may He ease and rectify your affairs, ameen.