how to transfer a url from page A to page B?

Already tried…

let url = new URL(string);
...or...
let uri = new URI(string);