awww sorry you lost him
it's very tricky to keep a beta alive. They sit there in their "tanks" at the pet shop for who knows how long and there's a big chance you get him on his last energy. And they don't live long either. It's difficult to keep them happy. My Beta lived for a year and a bit until he turned pink and died. He was blue.
I think keeping a beta alive for more than a month is a record.
I bought mine from walmart. Yes impulse buy. And well Walmart employees are SO helpful...not, so i just bought a bowl and food and he managed to stay alive.
So if you get another one be prepared that they don't have a long lifespan. Good luck
also, it's best to ask the pet shop employees to tell you which day they get new shipments of betas that way you get a fresh one and you have better chances with it. I got mine right on the day they brought them in.