How Can I Prevent Being in a Haram Relationship Again?

“I don’t want to indulge myself again in hopes. I don’t want any haram relationship. I want to fully focus on my studies.” Click!