A general solution would be use a calendar table, and you can read about this here: https://www.sqlshack.com/designing-a-calendar-table/.
Here is a solution that is targeted for this specific problem. It may not be the most efficient, but it may be good enough:
WITH dates AS (
SELECT date = cast(d.date as date)
FROM (VALUES('2022-01-31'),
('2022-02-28'),
('2022-03-31'),
('2022-04-30'),
('2022-05-31'),
('2022-06-30'),
('2022-07-31'),
('2022-08-31')
) AS d(date)
)
Select d.date, COUNT(DISTINCT P.ACCOUNTNO)
FROM CustFunds P
JOIN Customers A ON (P.ACCOUNTNO= A.ACCOUNTNO)
CROSS JOIN dates
where P.Activity = 'Active'
AND P.FundVALUE <> 0
AND P.TranDate >= '2022-01-01'
AND P.TranDate <= d.date
AND A.AIBID = '8ca2-0a854437aedsdsdXX5'
AND A.ACCOUNTTYPE = 4
AND P.ACCOUNTNO NOT IN (Select T.ACCOUNTNO
FROM DW_TECH_PROD.STG_DYNAMODB.TRADE_ORDERS T
JOIN Customers A ON (T.ACCOUNTNO= A.ACCOUNTNO)
WHERE EXECUTEDDate >= '2022-01-01'
AND EXECUTEDDate <= '2022-01-31'
AND A.AIBID = '8ca2-0a854437aedsdsdXX5'
AND A.ACCOUNTTYPE = 4)
GROUP BY d.date