There are add-ons for browsers which will do this, but they tend not to work on all platforms and the ones I've previously recommended have not been updated :(
By the way, a lot of Fedi apps nowadays will automatically show the link's post within the app itself (doing the copy-pasting for you seamlessly), but it doesn't always work.