How do I avoid getting attached?

I am not a lucky person when it comes to relationships, i always end up getting hurt, being ghosted for no good reason and i am done with the heart break and people letting me down, i met this guy recently and we have started dating last month, every thing is great and wonderful more than i ever wanted, but yet i still have my trust issues of him suddenly ghosting me, and leave, how do i protect myself from getting heart broken or being down, without running the Happy moments i have right now
How do I avoid getting attached?
Post Opinion