I rejected a girl and I regret it

I (23M) was talking to this girl (22F) online for three weeks (we met once before and I asked her social media then) and I really liked her, she was so pretty, kind, funny and we shared a lot of interests. It was just so easy, no late replies, honest about our lives, our past mistakes. We scheduled a date so everything went great. But I fucked it up. I ran into my ex of 2 years and we started to talk and things ended in my apartment. We broke up because of constant arguments about everything at the end. We broke up one year ago and I really thought I am over her but after she left all my feelings came back. I messaged the girl and told her what happened and I can’t continue with her. She thanked me for being honest. It was a week ago and I regret it so much. I told my ex it was a mistake and we must end things. She understood. Is there any chance I could continue with the girl or do you think I ruined it?

Edit: the timeline might be confusing, sorry. At first we met when we were in the same park at a weekend and just started to talk and the vibe was great between us, so I invited her for a coffee and asked for her social media. She doesn’t live in the city and she was busy in the last weeks, that’s why we couldn’t go on a proper date earlier. We talked everyday since we met.