As others already said, if you have the right environment provided and you are feeding them, then you are doing the right things. Some fish just don't make it. I bought a very robust red veiltail and a listless but gorgeous crowntail on the same day. Red lasted three days and went from active to dead that last night. Still no idea what happened with him, there wasn't any kind of disease or injury on him. Ghost (the crowntail) is still very much with me.
Hopefully picking the most active fish that seems to bond with you will make the third time the charm. Bettas totally can make puppy-dog eyes at you.
That and the good cleaning of the tank/decor as has been recommended by several others
The Boy Feesh: Indigo CT, Lavatail CT, Ghost CT, Chicory HM, Redfish VT, Magic DT
The Girl Feesh: Christmas CT, Shine VT, Snowflake CT, Stripes VT, Midnight CT, Grif VT, Tangerine VT, Wraith CT, Amethyst VT, Ice CT, Poe CT, Turquoise II CT