I'm sorry that your ex got with someone else yesterday. Not to pry, but have you two been broken up for long?
If your ex got with someone else almost immediately after your breakup, it could very likely mean that he/she already had someone else lined up and chances are good that he/she'll do the exact same to his/her new love interest. Narcissists and sociopaths/psychopaths are known to do this, emotionally unavailable people for whatever reason, even some people on the autism spectrum whose special interests include dating and sex. They do this to ensure that they're never alone and it has nothing to do with you, but everything to do with them and their issues.
Some people keep potential partners in online 'harems' or on the back burner and in constant rotation because they know at some point that they're either going to get bored of the current person they're with (they get bored of everyone), or they know they'll inevitably get dumped because they're assholes.
I don't know any of the details of your relationship and breakup, so if your ex is a decent person I can imagine how hard it must be to see him/her with someone new. But if your ex was an asshole then you're better off without him/her even if it's difficult for you to see that right now. I hope his/her departure will give you the space to find someone else amazing when you're ready to do so.