That’s just how it is—if it ends in a breakup, you’ll get hurt, but that’s part of life and being in a relationship. Now, if you’re afraid of feeling that pain, then it might be better for you to stay single instead.
If you’ve been hurt before, what you need to do is learn from your past relationships. If you always struggle with trust, then maybe it’s better not to have a boyfriend for now.
Because honestly, only you can answer your question—it’s all about emotions, and you’re the only one who can control them.