Generally speaking there are two ways to shave peaks: Demand and supply side management. These approaches may be employed individually or in combination to reduce peak loads.
To shave peaks on the demand side, the power consumption is simply capped to respect the threshold by shutting down/limiting large consumers eg. EV charging.
To shave peaks on the supply side, onsite electricity sources, such as generators or batteries, are employed to cover the demand that exceeds the limit.