You can do this on mac by right-clicking the link if already existing, or by selecting a piece of text and right-click to add a link. On iOS you’ll find the option to add/edit a link by tapping the link in the plus menu in the bar above the keyboard.
On both platforms you can create links using the markdown syntax, like described here: