Active delta hedging to hedge time decay and volatility erosion doubt

Out of curiosity, how do you use active delta hedging offset time decay and volatility erosion in puts. How does it actually work and what variables to take in account to find that delta hedge

Example 10: Long Volatility Strategy Payoff