how to focus when your mind is constantly trying to distract you?

i feel so distracted by people around me with their thoughts with upcoming plans. i have a very important entrance exam coming up it takes place once a year and ive used this year to prepare, i have a lot to lose if i dont make it in this attempt.
how do i let stop letting my boyfriend and my other friends' issue stop bothering me?

in detail version:
my boyfriends ex is his roomate's bestfriend and they've become good friends again after a while and he hangs out with her often but he's my friend too and all of that bothers me a bit cause of the past she's had with my boyfriend but im ready to let all that go, then the thought of that guy being a bad friend to me and my boyfriend occurs which further lingers on and messes me up. im not able to think straight i dont want to be bothered by all this, and in the midst of all this, my bestfriends birthday is coming up so planning for that too is getting a bit distracting but still i can compartmentalize that. i just want the thoughts of the ex to stop coming. im secure in my relationship my boyfriend wont do shi but i dont want a third person to fuck it up (again)

reddit.com
u/daringdemon69 — 11 days ago