When animating cloth, insert thin wire such as enamel wire at the end of cloth so that you can change the shape freely.
Cut the cloth into the size of the flag.
Cut the enameled wire so that it fits into the four sides of the cloth.
Fold the four sides of the cloth inward while inserting the enameled wire. and glue it
Make sure that the ends of the enameled wire overlap slightly.
You can fix the cloth in a free form.
In addition to wind, this method can also be used to fix it in a wavy shape like a curtain, or to prevent the shape from collapsing by adding it to the end of a skirt or coat.