IMO the biggest screw up in the whole storytelling was caused by Lucas in taking two of the greatest characters in the OT and having them essentially become completely cringeworthy in what they did.
Both R2D2 AND Yoda were great in the OT until he PT /the clone wars series essentially changed things up so he what both of them did in the OT made absolutely no sense.
Yoda , who stood up to the emporer in the PT , goes into hiding and refused to help the ongoing fight against the empire becoming a grumpy little ball of green. In what way is this any different from what Luke does . Both Yoda and Luke stood up against the greatest evil in the galaxy and then when they fail they go into hiding and become grumpy and initially refuse to train they respective successors (Luke and Rey) in his case , essentially tooling with them before ultimately changing their mind. Both feeling guilt over bringing about the end of a Jedi order.
Now R2 D2 when you take into account the things that they make him learn in the PT and the clone wars. R2D2 , who starts off the OT on the planet where he originally met. Anakin. He was present when Anakin killed the sand people, he was present when he married Padme, he was present when Anakin became Darth Vader, he was there when Anakin choked Padme which led to her death, he was present when both Leia and Luke were born and separated off to their respective families and knew they were brother and sister. He travelled with Yoda to Dagobah, and even likely knew this was where he was exiled. When he !at back up with Yoda did he alert Luke, did he help Luke and warn him what the planet was like, did he even tell him that this little green thing was Yoda, the sole living Jedi Master.
R2D2 is ultimately the worst plot problem in the whole of the 9 films because of the storytelling that was put into the prequels and the Clone Wars/Rebels series. He alone had access to information that could have helped the rebellion (like who Darth Vader was) even who both Luke and Leia were, what to expect on Dagobah, and even who Yoda was, but the little **** said nothing to anybody over the time of the OT. A massive series of plot holes that could have been fixed if they allowed R2 to have been memory wiped at some point, which is something they have been really keen on saying has never happened.