Broadly, in all conditions you want to keep the mast pre-bend suiting the mainsail. The controls at your disposal while sailing should allow you to change the shape slightly around this ‘neutral’ position, Flatter or fuller. However if the mast is allowed to bend too much or in the wrong places the mainsail will likely be distorting beyond its design range and become inefficient, unstable and difficult to control.
The objective is to reduce power in the top of the sails first, leaving the bottom sections to keep working. (So bend the top of the mast first). Similarly when it is very windy we are happy for the front of the mainsail to collapse but still have the back half (the leach) working. Otherwise the whole sail flogs and the boat becomes unbalanced and will create a lot of drag.