TL;DR
If all you need to migrate is the Git repo itself, you can clone the original project in a sandbox on your local machine, create the new project where you want it, set your new location as the remote and push there.
Notes
This answer is not specific to GitLab and will not copy Issues, MRs and other metadata. See @GinoMempin's answer if you need to migrate a complete GitLab project.
Since this answer uses only Git itself, it will work from any Git server to any other.
The fast approach: transit via a mirror
Assuming old_url and new_url are your old and new URLs:
git clone --mirror <old_url>
cd <repo_dir_name>
git remote add new_remote <new_url>
git push --all new_remote
If your new repo was empty when you did this, it will now contain all the branches that exist in the original repo, without any connections to it.
If you also want to push all your tags to the new remote, run this command next:
git push --tags new_remote
Note that you might have to create an empty repo on the new server before you do the push operations, depending on your new server's configuration.
The slower approach: transit via a regular sandbox
Some people have reported elsewhere that git clone --mirror doesn't always work as expected. If you're having trouble with the recipe above, you can use a regular sandbox instead:
git clone <old_url>
cd <repo_dir_name>
git remote add new_remote <new_url>
git push --all new_remote
With this approach, that git push --all will only push your main branch, because it only pushes all local branches, not all the remote tracking ones.
So checkout any branch you want to transfer to the new remote, and push it to the new remote. This is a somewhat slower process, but it also lets you control exactly what is being migrated, which can have its own benefits.
Again, you also need to push any tags you want to migrate, either all at once with git push --tags new_remote or one at a time.
Limitations
Migrating a Git repo via a clone will transfer everything that is managed by Git itself, but nothing else. If you have any MRs, issues, CI/CD, Wikis, etc, that you also want to migrate, you will have to use the export/import feature or another full migration approach.