But what would be your recommendation?
Open excel or some other excel-like program (google sheets or libreoffice or whatever).
Enter the dates you used and add up the number of days outside Canada. If you've entered the dates in date format, it's a simple subtraction (no complicated formula).*
If the days outside Canada are more than 1095 (three years in days) in the last five years (which takes you back to Oct 29, 2019 as of today), you are out of compliance.
[1095 days outside Canada is the same as 730 days inside Canada in the five year period. I do it that way because easier.]
You remain in Canada and wait to apply until the days outside Canada are well below 1095 (say, a buffer of at least a couple weeks, better 30 days).
It's obvious you are out of compliance without even doing the precise math: your absence from Jan 2022 to March 2024 is more than two years, and your absence from Jan 2020 to Aug 2021 ~18 months.
Equally easy: your Aug 2021-Jan 2022 presence in Canada is about 5 months. You'll need to remain in Canada until March 2024-date in future is about 19 months, or ~October 2025. So apply in, say, November 2025.
Again, do the arithmetic yourself.
*eg in excel or work-alikes, enter each date as YYYY-MM-DD (the only correct way to use dates on computers). September 30, 2024 is 2024-09-30. August 1, 2024 is 2024-08-01.
To count days out: =c4-c3 (formula in cell c5) gives 60 (days). Assuming you put the more recent date in the formula.
If this is too complicated, hire a lawyer (or a grade 7 student for the arithmetic).
The only catch here is that any day with some time in Canada counts as 'in Canada.'
So, for counting days
outside Canada, do the math from the day
after you leave Canada and the day
before return.
For counting days
inside Canada, do the math from the day of departure/arrival.
(Personally I use four dates - i.e. day of departure, first day outside Canada, last day outside Canada, day of arrival - to be certain I've not screwed up the logic).