Azure DevOps does not have a built-in function to do this task, but there are several tools available that can do the migration.
Migration Tools for Azure DevOps - https://marketplace.visualstudio.com/items?itemName=nkdagility.vsts-sync-migration
Canarys Copy Project - https://marketplace.visualstudio.com/items?itemName=canarysautomationspvtltd.vstscopyproject