Licenses required for sharedmailbox, distribution list and Microsoft 365 migration

I want to migrate sharedmailbox from one microsoft tenant to the other, do I need a quest tool license for it.
Also for Microsoft 365 group that has some emails to be migrated as well, will it require a quest tool on demand license for it?