About
Highlighting and copying code from questions/answers is not as straightforward as one hopes it'd be. Throughout the years, there were (at least) a couple of userscripts/extensions to address this need. However, they are not maintained and the links are dead.
I have found this gist by kpym to be still functional, however it could've used a facelift.
This userscript (written off of the linked gist) adds a copy button to the top right corner of code blocks to copy the code from questions and answers.
Dark mode:

Light mode:

Installation
Click to install with a script manager. N.B. I have only tested this with Tampermonkey on Firefox.
Repository
Here is the source code for this userscript; source code repo
