Pretty sure most of you already know this but for those who don’t: you have two clipboards in Linux. One is the traditional clipboard where you copy with control c and paste with control v. The other one is when you highlight text and use the mouse middle click to paste text.
More details here.
You can also configure vim to use the first clipboard (works with nvim but never tested on vim).
works with vim but never tested on vi
It does not work in vi. The + and * register were a vim invention (tested in vim compatibility mode and busybox vi)