Screencopy
Requires Cloth Config and Fabric API (if using Fabric)
This client-side mod provides a convenient way to copy screenshots directly to the clipboard. You just need to press the familiar F2 key as you normally do in Minecraft. The mod is fully compatible with macOS, Linux, and Windows operating systems on x64 and arm64 architectures.
The settings include an option to disable saving files to the screenshots folder if you prefer to work only with the clipboard.
The mod should not conflict with other modifications, including OptiFine, but if you encounter any issues, please report them in the questions section.