Any time you take a screenshot in the game, the image data is copied to the clipboard. You can then paste this anywhere (e.g. Discord, Imgur, Reddit) to upload the image and share it with others.
Works on vanilla servers, and modded servers without the mod installed!
Currently available for versions 1.10.2 to 1.12.2 (the 1.12.2 file works for all these versions) and for 1.14.3 Forge, and available for Fabric here!