How can we remain pure in all areas of our life, especially be pure in relationship with opposite sex?

how can we remain pure, if our world is full of temptation? like as singles how can we remain pure and not commit a premarital sex and wait until marriage. if almost all the people around us are doing this things, even our mind how can we make it pure?

Indeed, our sexual drive is one of the strongest desires and it is difficult to suppress. However, that doesn’t mean that it is impossible to do so.
Let’s take a look at the example of Joseph.

Gen 39:11 But one day, when he went into the house to do his work and none of the men of the house was there in the house,
Gen 39:12 she caught him by his garment, saying, “Lie with me.” But he left his garment in her hand and fled and got out of the house.

He was able to resist the temptation because he fled from Potiphar’s wife. Should Joseph stayed there a minute longer, he would have committed adultery with Potiphar’s wife.
A lesson that we can glean from this is we shouldn’t put ourselves in a situation that we can commit sin.

Also, all sins starts from the mind that is why we have to guard our thoughts.

7And the peace of God, which surpasses all understanding, will guard your hearts and your minds in Christ Jesus. 8Finally, brothers, whatever is true, whatever is honorable, whatever is right, whatever is pure, whatever is lovely, whatever is admirable— if anything is excellent or praiseworthy— think on these things.

In our generation today, sex is as easy as giving a kiss to someone “too easy” to do. So how can we pursue purity in love? Firstly, you have to be specific about the purpose of that relationship. Is it merely your pleasure, theirs, or God’s? If you are looking for a relationship that entails pleasure, that doesn’t really pleases God.

So in order to avoid those temptations, you have to ask God to give you courage as well as wisdom in order to set boundaries in your relationships in order to protect yourself from people who are tempting you to commit such sin.

It is possible for one to maintain a great relationship with the opposite sex, this can be achieved whenever people learn to give their best while embracing brotherly love. Love, therefore, acts as a strong shield able to protect taking advantage of each other. This is because they end up cherishing their engagements and can even transform into a great kind of experience.