JSFiddle - React, Tailwind, and code Playground
HTML
<button type="button" id="123"> Find out how</button>
<button type="button" onclick="foo()"> click me to focus on left button</button>
JavaScript
function foo(){
alert("clicked");
document.getElementById('123').focus()
}