If you type a / at the beginning of a comment, it pops up a menu of "quick actions".
One of those actions is /dup{licate}. If you type
/duplicate #NNNNN
and save that comment, GitLab will mark the issue in which you make the comment as a duplicate of issue #NNNNN.
This is extraordinarily well documented, in a place that's easy to find, just as many other GitLab features are documented in a place easy to find./sarcasm.
I found it, after some Web searching, and following various GitLab issue links for issues on GitLab itself, from
https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10391
and
https://docs.gitlab.com/ee/user/project/quick_actions.html
The first of those was the first one I found; annoyingly, the first thing that a Google search for
slash command gitlab
turned up was
https://docs.gitlab.com/ee/integration/slash_commands.html
which has nothing to do with GitLab issues; the merge request called /duplicate a "slash command", which led me to waste time with that search.