Unfortunately that doesn't work.
This only works for elements of the content types word, excel, pdf and so on.
In my case there are also elements of the type "Link". This is just a shortcut file.
When you click in the sp library on "new element", choose "Link", you can ad a Hyperlink (URL).
SP generates an alias file. The document title is shortened to www.xxxxxxx.de.url (like powerusers.microsoft.com,url). The content inside the doc is something like this:
[InternetShortcut]
URL=https://powerusers.microsoft.com/t5/Building-Power-Apps/Get-URL-form-an-Link-Element-from-SP-DocLibrary/m-p/1479796#M383559
When you link it in your way, clicking the link opens or downloads the file "powerusers.microsoft.com,url". Then you have to click again on the file or the button in the browser to open the target url.
But i want to open the link immediately.
Mayby this works in MS Edge, but not in browsers like chrome, safari or son on.
When this doesn't work out of the box in power apps, i already have a solution with power automate.
When a user adds or changes a element with the name ending ".url", power automate decodes the file to a string, cuts of the "[InternetShortcut] URL=" and returns the compose to an additional link field (in the sharepoint library). But this is very complicated …