JSFiddle - React, Tailwind, and code Playground

HTML

<select id="">

      <option value="1">1</option>
      <option value="2">2</option>

  </select>

JavaScript

$("#qtd_menores").change(function(){
        var obj   = $(this);
        var valor = $(this).val();
        
        obj.nextAll('input').remove();
        obj.nextAll('label').remove();
        
        for(i = 0; i < valor ; i++){
            $("#filhos_area").append('<label for="nome_menor">Nome:</label><input type="text" name="nome_menor[]" id="nome_menor" /><label for="dnasc_menor">Nascimento:</label><input type="text" name="dnasc_menor[]" id="dnasc_menor" class="bt_input_peq data" />');
        }
    });