JSFiddle - React, Tailwind, and code Playground

HTML

<select id="id">
<option value="one">One</option>
<option value="two">two</option>
</select>

JavaScript

let select = document.getElementById("id");
for (let i = 0; i < select.options.length; i++) {
    if (select.options[i].value == "two") {
        select.selectedIndex = i;
        break;
    }
}