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:
Option 1
Cmd+Shift+P> typeGitLens: CopyCmd+C+Pis free)Option 2
(ref How can I copy the repository URL for a line of code in Visual Studio Code?)
Cmd+Shift+P> typeGitLens: Copy