If you’re moving emails from an IMAP server to Office 365, using Microsoft 365’s IMAP Migration works well for smaller migrations. You can create the Office 365 mailboxes, add the IMAP server details, verify the credentials, and run a migration batch from the Exchange Admin Center.
Manual...