Maybe permission and port select hand, repost and script below. stackoverflow.com
<button id="connect" >Connect</button>
<script>
document.getElementById("connect").onclick = async () => {
const port = await navigator.serial.requestPort();
await port.open({ baudRate: 9600 });
console.log("Hello World");
};
</script>