I can only delete the last entry I added in database

The only thing I can delete is the last entry I added, the previous entries that I added are not deleted whenever I try to delete them. Here’s my code.

DeleteData1.addEventListener('click',(e)=>{
   if(document.getElementById('deleteCrop').value == ''){
  alert("Fields must not be empty");
}else{
   remove(ref(database, 'Crops/' + document.getElementById('deleteCrop').value))
  .then(()=>{
     alert("Crop successfully deleted");
  })
  .catch((error)=>{
     alert("Unsuccessful, error" + error);
  })}});