On Linux, probably in every desktop environment you can use the third mouse button to past a previous selected text.
How to achieve such behavior on macOS?
Are there any scripts or commands one can run on the start of the OS to be able do this?
Edit: some moderator suggested some answered question, but the solution doesn't work for me. Perhaps it's because I am using Monterey in 2022 and the solution is from 2016 - so six years old and probably unsupported for many years.