a cockatiel is a little bird with a great big heart. He is intelligent; he thinks. He has feelings. If you were in someone’s care, like a bird in a cage, wouldn’t you want someone to care for you who is willing to learn everything he can about how to properly care for you?
Your bird should have lived much longer than just 2 to 5 years. Did you feed him something besides just seeds? Did you give him fresh greens? Did you change his water at least twice a day? Water that sits without being changed gets bacteria in it that can kill a bird. And you won’t notice anything wrong until he is too sick to recover. Since birds are hunted by larger birds, such as hawks, the smaller birds will hide their illness. That way they don’t end up as a meal for some predator.
Did you have his cage in a draft-free area? Even if you have an air filter machine placed nearby, that particular appliance will put out a draft. A constant draft will kill a bird. You need to have an area of the cage with a Happy Hut or some kind of other shelter so the bird can remove himself from drafts and from your view. A bird needs to be able to hide if he wants to.
Too much activity going on in the household, and no place to hide inside his cage, can cause the bird to get sick. Plus, he needs a good 10 hours of quiet, being covered, each night. Birds are like little children; they need plenty of rest or they’ll get sick. Birds also need toys. Cockatiels, in particular, love mirrors and colorful plastic beads. They love it when you give them lots of attention, just like a dog does. I have a tiel who seeks my attention every evening, singing to me. This little guy is in a cage with his mate, but he stands at the cage door, looks at me, and sings his heart out. He has a personality as big as any of my larger parrots. He even talks a little.
There’s a lot of good books available for people who want birds. Please, please, read one before you consider getting another bird. Also, if you do get one, he needs to see an avian vet at least once a year for a checkup. You should take him in right after you get him so the vet can assess whether he’s truly in good health or not. A vet can spot a lot of things that you wouldn’t ordinarily catch.