JSFiddle - React, Tailwind, and code Playground

HTML

<button id="removeAll">Удалить всё</button>
<button id="addLine">Новая линия</button>

<div id="orderForm">
<p class="orderLine" width="90%">
    <input name="field1" type="text" id="field1">
    <button class="removeLine">Удалить</button>
</p>
</div>

</body>

<script type="text/javascript">

$(document).on('click',".removeLine",function () {
  $(this).closest('.orderLine').remove();
});
$("#removeAll").click(function () {
        $('.orderLine').remove();
 });

$("#addLine").click(function () {
  $('#orderForm').append('<p class="orderLine" width="90%"><input name="field1" type="text"><button class="removeLine">Удалить</button></p>');
});
</script>