If you see your ex with someone else, then, be happy for them. Your ex did what an ex was supposed to do, which was to find happiness again. Did you expect your ex to always occasionally tell you that they miss you and they’d like to try again with you? Did you expect your ex to not be able to ever get over you? Did you expect your ex to always be ready and available for you when you feel like it’s the right time to get back together?
What you had with your ex was something beautiful and tragic, but it was an experience that helped you both grow, and it’s something that your ex will carry on to the next relationship to ensure that it has a better chance of working out this time around. Your ex will take everything that happened with you, learn from it, and live by those lessons in the new relationship so that some mistakes won’t be repeated and some things will be avoided.
Just because your ex found happiness before you did doesn’t mean you should hate them for it. You shouldn’t be feeling any bitterness towards your ex for finding someone new, and you shouldn’t think of it as being replaced. It’s you that has to come to terms with the fact that it was amazing while it lasted, and unfortunately, it’s ran its course. It’s you that has to accept that your ex has now outgrown you and found someone who’s better for them. It’s you that has to understand that if you loved your ex at all, you’d know that this is for the best and your ex is better off without you.
You’re allowed to think about your ex, you’re allowed to miss your ex from time to time, and you’re allowed to care for your ex, but you’re not allowed to stand in the way of their new relationship and hold them back from being happy. Just be thankful that you were even with them, be happy for them, and move on.