Selecting output with the mouse and hoping you got every line is fiddly. PowerShell can put it on the clipboard for you.
Pipe anything into Set-Clipboard, or scb for short:
Get-Content $HOME\.ssh\id_ed25519.pub | Set-Clipboard
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 | Out-String | Set-Clipboard
The first is the classic: copying a public key to paste into a web form. The second shows a detail: objects are turned into text first. Without Out-String you get only the default string of each object, which for many types is just the type name, so I’d add it whenever the output is a table.
-Append adds to what is already on the clipboard instead of replacing it, which helps when you collect bits from a few commands. The way back is Get-Clipboard, which hands you the clipboard as lines you can pipe on.
Over SSH there is a twist. Set-Clipboard then fills the clipboard of the remote machine, which is rarely what you want. PowerShell 7.4 added -AsOSC52, which uses an escape sequence to set the clipboard of the computer you are sitting at. That only works if your terminal supports OSC 52; Windows Terminal does.
Further reading: Set-Clipboard (Microsoft Learn)