Flags had been mostly used as rallying factors throughout battles; squaddies might assemble round their colors for morale
https://landenxuhs760.quantlynix.com/posts/reenactment-essentials-must-have-civil-war-flags-for-authentic-experiences
Flags were on occasion used as rallying points for the period of battles; infantrymen could bring together around their colorations for morale toughen when confronted with overwhelming odds.