In John 14:27, Jesus states that the peace that he gives is in stark contrast to the peace of the world. In this 1st century context of the NT, peace was created by military conquest and then it was maintained by comprehensive rule and force. More specifically, the Roman Empire’s view of peace was completely circumstantial, externally driven and theoretically could be lost at any time.

So to give a general summary of the world’s quest for peace or tranquility of mind—it is sought after by seeking to protect oneself from any negative, external circumstances and if that can’t be obtained, then there is a desperate pursuit to distract oneself from the circumstances or even drown them out. This creates a hamster wheel effect of making a lot of effort, but getting absolutely nowhere.
Because the disciples will still be in the world and thus susceptible to the worries of the world, Jesus concludes v.27 by exhorting them what to refrain from, which infers that we are not passive in obtaining this peace. The 1st prohibition is a repeat from the first verse of the chapter—do not let your heart be troubled, which is the main intention of the content Jesus has been teaching. Then Jesus adds an additional prohibition at the end of verse—nor let it [your heart] be fearful.
This is not the normal word for being frightened that is found all over the Synoptic gospels to describe the disciples’ response to certain situations involving Christ. This is the only time this particular verb is used in the entire NT, which is why the NET translates the last part of v.27—do not be lacking in courage. There’s a tremendous indicator of possessing a peaceless, troubled heart—there is no courage. And when that is the case, there’s no resolve to move forward in the ways of Christ and thus there’s a paralyzation or self-protective complacency from being faithful. Those who lack the peace of Christ are too fearful to make close relationships or if they do consistently interact with others, they seek to manipulate those relationships so that they can minimize their fears. Likewise, Jesus knows his disciples can never hope to strive towards faithfulness if their hearts are weighed down by fear and distress.