How to get the valid URL of a Link field from within a Twig template?
Your PHP from your latest edit would translate into twig like this:

{{ node.field_my_link.0.url }}


This works like this, 0 returns the first item of the field item list, url gets the url object and because twig will cast this object as a string this will call the magic method toString() and will output the url as a string value.

You only need to use url, because twig looks automatically for the method getxyz() if there is no property with that name xyz.