Modification of registration in a Google Sheets

Do you mean to delete the row in your upd function ?

You may also want to consider doing it this way

or use the native Spreadsheet component