It happens often when I work in VSCode and I need to send a code line URL from a repo to a colleague.
There is no native support for this in VSCode. There is a capability that's enabled by Atlassian plugin if you are using Bitbucket. However, I've been looking for a more versatile option.
An answer I found using GitLens:
Cmd+Shift+P
> type GitLens: Copy
Cmd+C+P
is free)(ref How can I copy the repository URL for a line of code in Visual Studio Code?)
Cmd+Shift+P
> type GitLens: Copy