No, prayer does not change God’s mind, as God is absolutely immutable. It is a dogma of faith that there is no change in God, so it is impossible for God to “change his mind”, otherwise, he would not be God.
This question actually touches on the mystery of Divine Providence, itself an area of study in theology. The order of grace is fixed and eternal, and any answers to prayer are already part of that eternal order. Put as simply as possible, a prayer is “answered” because God has made the outcome contingent upon that prayer, but since there is also no change in Divine Providence, given that it is not external to God, even the prayer, being an action moved by grace, is itself a part of that providence.
It’s impossible to condense this mystery into a single post: volumes can be written on this question and other questions corollary to it. But that’s kinda the gist of it.