I would not be too hard on yourself. Like you said long distance is extremely hard and kills relationships, even long term ones, let alone a young one like yours. It takes work - video calls, presents, routine conversation - and that comes from a commitment that you two hadn’t established yet. Or perhaps he was never willing to provide.
It is scary how quickly feelings can change, but I put that down again to how little you guys had known each other. I also had a 3 month relationship that was amazing, and we went LDR and it was like I couldn’t even remember their face or their voice after a while. If you had known him for say a year, it would have been a lot different.
I learned how to do it purely to get free food at a restaurant. The idiot proof method takes about a day to learn and a bit longer to do reliably. Recommended!