God works in mysterious ways
A phrase acknowledging one's lack of control over a situation, especially if something strange or unexpected has happened, along with the possibility that some good may come from it. A: "How are you doing since getting rejected from your dream school?" B: "Well, I'm trying to keep in mind that God works in mysterious ways, and I hope some good will come out of all of this." As Helen grieves the loss of her husband, I just keep reminding her that God works in mysterious ways.
the Lord works in mysterious ways
A phrase said when things have not happened as one had hoped or expected. It implies that everything happens for a reason. I know you were really excited about that job, but maybe it's for the best that you didn't get it—the Lord works in mysterious ways, after all. I thought that getting divorced would be the worst experience of my life, but then I fell in love with my divorce lawyer. The Lord works in mysterious ways!