So the mother of all chakra is defeated by Naruto and Sasuke. It really doesn't make sense already, but my only problem is with how quickly they do it. Hagaromo stated that it took him and Hamura MONTHS to defeat Kaguya. But about an hour after being released from her seal she's defeated by Naruto and Sasuke? Sure Sakura punched her once at the end, and Kakashi threw in some kamuis here in there, but I still don't think they could have sealed her that quickly.
This fight within the narutoverse is one of the few examples where a team made a huge difference other than a one on one fight . Hagoromo and Hamura took months to defeat kaguya . On the other hand Naruto and Sasuke were with sakura , obito and kakashi ( one of the most revered shinobi in narutoverse). also one of the other major reasons she was defeated was because of the tailed beasts themselves .
Kaguya herself was fighting after thousands of years , She had a massive chakra even greater than madara as sasuke confirms . She was continuously teleporting between dimensions which was consuming huge amounts of chakra from her . Black Zetsu although made a plan of separating them , and did so successfully . Obito successfully bought him back with the help of sakura . Although you say that sakura just threw a punch and there were some kamui's by both kakashi and obito what you forget was how they came at absolutely crucial moments . Obito gave up his life to save both of them from All-killing ash bones of Kaguya .
The major turning point within the battle came when kaguya got hit by the Naruto's Rasenshuriken . Taken From Wikia[Naruto Shippuden]:
After getting hit by Naruto's tailed beast powered Rasenshuriken, the Ten- Tails' chakra within her reacted violently to the chakra of the other tailed beasts, transforming her into a rabbit-like chakra monster, which according to Black Zetsu was a form she couldn't control.
Now the battle went downhill after this , when hagoromo and hamura fought kaguya there was no concept of the tailed beasts being separate , but during these two thousand years they had spawned from the ten tailed beast and had gained experiences and fought in wars . so when naruto hit her with the rasenshuriken , she was in the unstable state wherein she was being attacked both from outside and inside [ the tailed beasts started resisting there capture] and it was soon after this weakened moment that they were able to seal her . Although she tried to escape , there came in sakura's opportune punch to stop her from this and they successfully sealed her .
Another thing you need to be wary of is the war itself took only within two days .