Is this just a coincidence or something that happens with people emotionally hurt?

So I saw somewhere in a video that the guy said (joking or serious) the best way to get over being heartbroken is to find a good person get them attached and break them then you’ll feel better. Me personally that’s evil and a A-hole kind of thing to do. But recently I’ve talked to a girl and she was talking to a guy long story short she really liked him but found out he got back with his ex and he lied about a lot meanwhile they were planning on getting a place together. Right after she talked to me and I really liked her. Good morning texts, FaceTime calls , I genuinely cared about her stuff in life even tho we were long distance. I got her her favorite book she’s wanted and a cheaper diamond necklace I can’t really afford the real thing but she thought it was real and she liked it. But lately she’s been dry, barely texting or calling, inconsistent with communication, and telling me about this guy she’s talking to. Now the guy thing hurt the most like it was a stab in the chest and back. Especially since I cut off every girl every single one.
Is this just a coincidence or something that happens with people emotionally hurt?
Post Opinion