In the Luke 22 passage, Jesus indicates that he is speaking about different circumstances. These quotes are taken from the New American Bible Revised Edition (an officially approved translation).
Instructions for the Time of Crisis.
35v He said to them, “When I sent you forth without a money bag or a sack or sandals, were you in need of anything?” “No, nothing,” they replied. 36w He said to them,* “But now one who has a money bag should take it, and likewise a sack, and one who does not have a sword should sell his cloak and buy one. 37For I tell you that this scripture must be fulfilled in me, namely, ‘He was counted among the wicked’; and indeed what is written about me is coming to fulfillment.”x 38Then they said, “Lord, look, there are two swords here.” But he replied, “It is enough!”*
Here is a footnote on the same page: * [22:36] In contrast to the ministry of the Twelve and of the seventy-two during the period of Jesus (Lk 9:3; 10:4), in the future period of the church the missionaries must be prepared for the opposition they will face in a world hostile to their preaching.
These passages are difficult to be sure. But, again, we always have to remember the context.
God bless you.