In the end I was able to get it out with the help of the focus function, I leave the solution, hopefully the problems will always come out fast
<input type="text" placeholder="code" maxlength="4" onkeyup="if (this.value.length == this.getAttribute('maxlength')) input2.focus()" />
<input type="text" id="input2" placeholder="code" maxlength="4" onkeyup="if (this.value.length == this.getAttribute('maxlength')) input3.focus()" />
<input type="text" id="input3" placeholder="code" maxlength="4" onkeyup="if (this.value.length == this.getAttribute('maxlength')) " />