I want to think that between the second snap and when tony/cap/thor faces thanos was much more time than just minutes.
But again, when you can open a portal and say "wong, gather all the sorcerers and pick up everybody in wakanda / new asgard" its not THAT hard to believe.
Because it wasn't just Wong and the sorcerers quickly pushing people through portals. It was literally everyone from the mcu. Everyone that's been gone for 5 years along with everyone that's been around. Everyone geared up and ready to go. No time for joyous hugs that their loved ones returned. No time to strategize. No time for talk. The writers just needed everyone there. And while I still quite loved the scene and Caps line, it's entirely poorly orchestrated and my suspension of disbelief was shattered. I would've liked far more time in between the Hulk snap and the final show down. The surprise that everyone's here to back up Cap was beautiful. But I would've absolutely written it differently. Personally I would've just had the dusted team that was on Titan make their return at that moment. Not every single person ever.