I've had my cockatiel Lavitz since the end of August. I was told he's about 2 years old, and I'm his third owner in a year. He's perfectly nice, I just don't think he was socialized well when he was young and then bounced around between homes so that undid any training he may have gotten.
Anyway it's been a lot of patience and daily training exercises, but he's becoming more confident and relaxed with me every day. I stick to a routine so he knows when to expect things, and whenever I'm home I leave his cage open so he can come and go from it as he pleases. He wouldn't fly at all when I first got him, now he does at least one lap around my living room every day.
I did not get his wings trimmed because I have cats and Lavitz needs to be able to get away if they get too rambunctious around him. I haven't had any issues with him being able to fly, except the one time he overshot his landing on his cage and ended up behind my fish tank and I had to rescue him.
He's still not a fan of my hands getting too close but he's come a LONG way since I first got him. Now he'll eagerly come over to me and hop up on my legs if I'm sitting on the floor watching tv (he's even taken naps on me a couple times). A few times when he's been flying around I can tell he wanted to land on me but then remembered that he's still timid around people and he'd veer away at the last moment.
Once I got him off the seed mix he came to me with (he's on Zupreem pellets and Nutriberries now, plus some fresh veggies and other snacks), and he wasn't getting sunflower seeds every day any more, I can now use them as treats to encourage desirable behaviors. I also do the normal enrichment things like rotate toys and perches, give him foraging toys, and try to teach him to whistle tunes. (He doesn't have a very musical ear, sadly

.) Having mental stimulation like that has also helped him to calm down and see me as a friend rather than just a giant thing that walks around his cage.
I guess what all this is saying is that it takes a lot of patience sometimes to get a bird to trust you. Like, months. Don't get discouraged. Keep trying, use positive reinforcement, make sure all his husbandry needs are met, and you'll get there eventually.