"Rejoice in the Lord always; again I will say, Rejoice. Let all men know your forbearance. The Lord is at hand. Have no anxiety about anything, but in everything by prayer and supplication with thanksgiving let your requests be made known to God" (Philippians 4:4-6).
Most of the time anxiety is not particularly helpful. The purpose of anxiety is to make us alert and ready to avoid some danger. But when there's nothing we can do to avoid the evil we're afraid of, when it's not reasonable for us to take many steps to avoid it, or in general when this being-on-guard against danger is useless, there's no point in being anxious. It takes away peace, and hinders us from a wholehearted and joyful pursuit of the good we are about. An recent example occurred, in which someone on a pilgrimage was anxious about reaching a Mass on time. The judgment that they should walk more quickly might be a reasonable one, but after making such a judgment, and increasing the pace, there is no point in worrying more about the matter.
But how to avoid such anxiety? One important step is to mentally accept the potential bad outcome about which one is tending to worry. If there is nothing more one can to do avoid it, it is perfectly legitimate to accept it as if it already happened. Another step, more relevant to the passage quoted from St. Paul, is to look at the matter in light of God's providence. The present situation is within God's providence, as well as the outcome, whether that turn out to be what one is hoping for, or the contrary. St. Francis de Sales states, as a general principle, that we should do what we can to attain good results, but leave the result in God's hand, as in fact it is. As we accustom ourselves to seeing God's hand in everything, this reliance on God will naturally lessen worry and anxiety, without in any way diminishing our care to fulfill our duties.
See also sayings of St. Therese on love