Why did the Avengers close the windows before Hulk's snap?
I don't remember what the reason was.
They clearly didn't know what was going to happen when Hulk but the Stark Gauntlet on, they all suit up and prepare for the worst to happen. Tony puts his suit on and projects a shield, Ant-Man suits up, Rocket and Hawkeye just tense etc. They are all just being extra careful. They're not sure what's going to happen but best to shield the base in case the worst to contain whatever happens.
Remember they have Rocket with them and some of them had spent some time with the Guardians, it's likely they'd been told the story of when they wielded the Power Stone or when Carina grabbed it and blew up the Collector's collection in Guardians of the Galaxy. Better to try and minimise the effects of an explosion than deal with it afterwards.
Lastly, they are also not aware of what Hulk would do when he puts the Stark Gauntlet on, sure Banner is all but a pacifist but he has merged with Hulk who has been known to go on the odd rampage. If Hulk got angry and took over who's to say what would happen with the power he has. Again best to try and contain him in that room and try and take it off of him before he gets loose on the world.