If you want to archive iCloud emails directly in Mail Archiver then you have to use an application specific password. After you have created such a password you can use it in Mail Archiver.
In the Setup click on the Plus icon to create a new account. Select iCloud in the window for creating an IMAP account:

Enter your iCloud email address and the app specific password. The normal password does NOT work!!!

If you entered the information correctly then the account should be created fine:

Then you can add the account to your plan.
Updated 11-May-2023 with new screenshots.