XIRR (Extended Internal Rate of Return) or Money-Weighted Return is the most accurate way to measure the performance of a portfolio when money is moving in and out at different times. It calculates the single annualized discount rate that makes the net present value of all cash flows equal to zero.
Unlike Time-Weighted Return (like CAGR) which ignores cash flows to isolate the investment manager's performance, XIRR reflects the true experience of the investor. If you make a large deposit right before a huge market rally, your XIRR will be significantly higher than the portfolio's CAGR because a larger amount of money captured the gain.
XIRR is explicitly used in Dollar Cost Averaging (DCA) and periodic contribution backtests to determine the true annualized rate of return on invested capital.