Obi-Wan loved Anakin but he could not save him
It may not seem like it but I actually quite like Obi-Wan´s character, he is loyal, he is brave, he is sarcastic, he is funny and loving even if very emotionally repressed while also being an extremely manipulative man who enjoys a good verbal sparring partner wether he can find them, I HC this was his favorite part of his relationship with Satine or even Anakin.
Obi-Wan is also a very competent and ambitious man, even as a padawan he complains that his Jedi Master Qui-Gon Jinn, could have become part of the council years ago if he just stopped opposing them in some of their decisions, this says something interesting about Obi-Wan, he enjoys the approval of authority in order to advance in his own career and for the life of him he doesn´t understands why Qui-Gon didn´t seem to care for his own career as a Jedi. They had different priorities, Obi-Wan wanted Qui-Gon as part of the council because he loves him, thinks he is the best jedi master ever and deserves that post. That´s Obi-Wan´s love language, to see his loved ones advancing in what he cares the most.
This paints the main difference between Obi-Wan and Qui-Gon, Obi-Wan want´s to become a leader on their order and hold one of the hightest offices there as part of his advancement as a Jedi and he feels shame everytime his master opposes the Council while Qui-Gon believes it´s a good thing to have your own critical judgment and bring important matters to the Council to discuss with them without completely ignoring your own experiences even if they sometimes contradict the Jedi Council´s decision. Obi-Wan is more of an institutional Jedi while Qui-Gon worries more about his own connection to the force, the role he plays with it and how he can better serve the force´s will while in Obi-Wan´s OT words "sometimes the force obeys your orders"
That said, canon Obi-Wan was modeled after the "failed teacher" arquetype and he is written that way, especially in the original movies, his OT character straight admits this "I tought I would be able to train Anakin as well as Yoda did, I made a mistake" Obi-Wan isn´t saying this to take responsibility for Anakin´s actions, he is saying that he didn´t teached Anakin the best way to become a jedi and he feels responsible for Vader´s existence and for his failings as a teacher and the way they affected Anakin´s decisions but also the whole galaxy.
In the PT we see young Obi-Wan choose to train Anakin for the wrong reasons, he didn´t trust the kid at first and openly said this in front of Anakin, hence they would not have a good start for their teacher - student relationship but his grief and the deathbed promise he made to Qui-Gon, made him choose Anakin as an apprentice when he wasn´t truly ready to teach a Jedi.
Young Obi-Wan wasn´t thinking about Anakin´s well being, he was thinking about his own grief and he was arrogant enough to believe that training Anakin would not be as hard if he did exactly what the Jedi Order taught him.
Only Yoda tried to convince him that this was a mistake, Anakin already knew his mother, Anakin had a good heart but he was afraid for his mother and the danger in which she still was, Anakin could not be raised as a traditional jedi because he remembered his family and wanted his mother to be safe and his friends to be free.
Obi-Wan lack of experience as a teacher and his own inflexible personality, which Qui-Gon commented in TPM, lead to him forcing Anakin to use Obi-Wan´s own way of dealing with emotion, by suppresing it, when Anakin was used to comunicate his emotions openly and deal with them up front, that was the way his mother raised him, that was how Qui-Gon guieded win to win the race that won Anakin his freedom and Padme a way out of Tatooine, so Obi-Wan´s teaching style was the complete opposite of what was familiar to Anakin.
Anakin went from a happy 9 year old child, who only thought of others and seek their well being, to a bad tempered, insecure padawan, tired of being forced to just shut up wether he wanted to give his own perspective on missions with Obi-Wan and being told to just suppress his emotions wether he had something bothering him, Obi-Wan told him to ignore his force visions instead of helping him understand them, visions that warned him about his mother being hurt and dying, Anakin was tired of being forced to obey orders that involved abandoning his only family but Anakin still tried to obey them, even if he could not longer sleep seeing his mother being tortured and only after he told Padmé about his troubles, they decided to see if Shmi was fine.
This is quite clear in the movies, they don´t shy away from showing this side of Obi-Wan and the Jedi Order because that´s part of their own and Anakin´s tragedy, Anakin´s fall didn´t came out of the blue, it was the result of being abused by the systems to which he came to be a part of, even if that wasn´t the Jedi Order´s intention but that didn´t allow him to grow in a healthy way or even allowed him to argue his own point of view.
Lucas talks about this in interviews, Obi-Wan was over his head training Anakin because he didn´t trust his own student and didn´t understand him and so wasn´t willing to make room for some changes to adapt Jedi training to Anakin´s personal situation, which is what most masters worth their salt usually seek to do, like Yoda, Kanan, or Anakin himself did for their padawans, Qui-Gon was a better mentor for Anakin not because he was a better jedi than Obi-Wan, in fact I would argue Obi-Wan was a way better sword artist than Qui-Gon, but Qui-Gon was flexible enough to notice the changes he had to do to train Anakin and because he didn´t seek the Jedi Council´s approval the same way Obi-Wan did, he cared more about the force will than the jedi council´s will and that was what Anakin needed in a teacher to be able to understand his own role as a Jedi as well as his personal grow. Qui-Gon teached Anakin to use his instincs and think for himself, Obi-Wan teached him to obey his authorities.
Old Obi-Wan understood this and tried to be better for Luke and he was but he still made some of the same mistakes he made with Anakin, he tried to make him suppress Luke emotions for his father and his friends, in part because he still believed the best way to defeat the sith was by killing them but this keep the cicle of violence in which the sith were created, their own order supports this cycle so that could not possibly be the answer which was why Luke tried a different approach, because unlike Anakin, Luke was lucky enough to be raised to understand his own emotions without suppressing them and he didn´t fear disobeying his teachers because they didnt´control every aspect of his life, Luke knew he could just go back to Han and Leia if he disagreed with his teachers commands, as much as he loved and respected them.
Obi-Wan only was able to break this cycle of violence until he saw Luke´s triunph in getting his father back to the lightside. Obi-Wan didn´t believe it was possible and so never seek to do this, as Yoda said to Luke in ESB, that´s why you fail, because you believe it´s impossible. Obi-Wan believed it was a wish for power the thing that drove Anakin to the darkside, when in reality, if he knew Anakin better, he would have known it was his wish to save his loved ones the main thing driving Anakin and it was this same wish the one who saved him from the darkside.
Yoda and Obi-Wan were written as part of the good guys but Lucas made a point to signal they were flawed, that doesn´t make them evil and definitely doesn´t make the sith right just because they oppose them, it just means that following the lightside and the will of the force can be made in different ways and not even the best of masters know everything about the force and that´s fine, it´s wise to admit you don´t know everything to be able to keep growing and that was the lesson Obi-Wan and Yoda had to take to their bitter end, because as Yoda himself say in AOTC the Jedi became arrogant in their victory over the sith and stopped seeking connection with the force. So it´s a nice end for them to not only see their pupil help his father defeat the sith even if that wasn´t the way they wanted to and get back their connection to the force that they are now able to manifest after death, getting a kind of inmortality while still learning about the force.
I guess I am saying all this because I believe Obi-Wan is a perfectly good and flawed character who grew up in the Jedi Order and did his best to train Anakin but as a result of his envoirment, his lessons were the wrong ones Anakin needed at the moment and there´s no shame in admiting that but that fandom often tends to mischaracterize him to write him as a Gary stu and it´s a shame because canon ObiWan is such an interesting character in his own right.