Ive had bettas my whole life before going to freshwater. These fish do need perfect water quality. They also need a tank with filtration (very very minimal flow) but still need it for success with them. 5 gallons with places to hide is the best tank set up, most people think they dont need room to swim because they “come from small puddles”. This isnt true, bettas like having plants and other stuff to take cover in. Be careful to not over feed them, that wont be good. If you get another betta I recommend this tank set up as Ive had bettas live to 3 years in this condition. Also use the water suggestions from
@vetteguy53081 . They also have “betta tanks” as some stores next to the bettas that replicate the tank set up I described, I would look into that. Sorry to bear for your loss, bettas are my favorite freshwater fish