JSFiddle - React, Tailwind, and code Playground
HTML
<input type="tel" maxlength="4" id="telNo">
<input type="text" maxlength="4" id="text">
JavaScript
(function(){
$('#telNo').on('input' , function(){
if($(this).val().length == $(this).attr('maxlength'))
$(this).next('input').focus();
});
})();