well it very sad but you know you can't see it this way. Betta can get sick anytime no matter how right you take care of them. I have 10 of them and i have one that is 5 years old (almost) and i have one that died at age 2. So if you in this hobby you need to understand it . We give them life and our love. And we try our best to help them when they sick. I remember my very first betta died at age about 1.2 year old. I was sad but just want to save another betta and i just want to the store and now i have 10 lol.
I would recommend to have emergency kit at home for your betta. At least if you don't want to spend money for the medications you can just have aquarium and epsom salt just in case you need it.
I hope Tauro doing well