Sometimes spells work, sometimes they do not. Sometimes prayers produce results. Sometimes they do not. Nothing is infallible. Death is inevitable. What we do with our lives is a matter of as much choice as we can muster, given the limitations of genetics, circumstance, and happenstance.
Some of us find pleasure and fulfilment in the practice of religion, magic, occultism, and/or mysticism. Others of us do not.
You have wandered into a group of people who practice magic -- but how each of us *defines* magic is left to the individual.
Now, there is a further wrinkle with respect to the question of whether magic *always* works, and that is the matter of "belief."
You may have read in a book or heard in a movie that "magic only works if you believe it works" or "spells only have an effect on people who believe that magic can affect them." These statements and others like them are often used to rationalize away the fear that one has been magically attacked. One says, in effect, "Magick can only harm me if I believe in it."
The "it only works if you believe it works" defense against magical harm is generally invoked by folks who think that the only metaphysical concept to which they need pay heed is their own consciousness.
One logical offshoot of this form of solipsism is something i call "belief in the consent of the victim" -- a mental gymnastics move whereby a solipsist can legitimize unfortunate events. Belief in the consent of the victim is sometimes expressed as, "If it happened to me, i must have allowed it to happen or subconsciously willed it to happen to me."
In New Age circles, belief in the consent of the victim gives rise to ideations such as, "The reason my house was destroyed in that landslide was because i subconsciously wished to learn a lesson from that event," or "I would not have been born a paraplegic if on some level i did not desire to experience life as a cripple."
Solipsism of this sort can be theoretically intriguing, but realistically it is untenable to me, because i see practical evidence all around me that things happen to people that are not within the control of the people to which they happen.
Thus, the invocation of "belief in the consent of the victim" as a presumed "law" of magic seems foolish and weak and unrealistic to me.
This does not mean that i believe that magic *always* works -- it merely explains why i do not explain away any failures of magical spells by invoking the illogical idea that "magic only works if you believe it works."