Anakin Starkiller said:
Also, no, Obi-Wan dying did not advance the plot.
He’d have nothing to do on Yavin IV except sit around and watch. He would have served no purpose. Dying he was able to guide Luke into trusting himself and the Force in not needing his targeting computer to destroy the Death Star. In Empire he guided Luke to finding Yoda and advised him against confronting Darth Vader as he wasn’t ready. In Jedi he helped Luke see Yoda would always be with him and that he must confront his father again or Palpatine would win.
His death advanced the plot and served as character development for Luke.