Retool, web3 & metamask

I wanted to create a UI using retool, and it does involve web3 interaction and interaction with the wallet like metamask.
How can we achieve this ?

I tried adding this JS library for web3 https://cdnjs.cloudflare.com/ajax/libs/web3/1.8.1/web3.min.js

and tried running this script from a javascript query

const ethEnabled = async () => {
if (window.ethereum) {
await window.ethereum.request({method: 'eth_requestAccounts'});
window.web3 = new Web3(window.ethereum);
return true;
}
return false;
}
return ethEnabled()

It returns false as expected when the metamask is not installed in the browser.
When the metamask is installed then it seems stuck up at
await window.ethereum.request({method: 'eth_requestAccounts'});

The query just keeps on running.