Dropdown dynamic update list – apps script / javascript / googlesheet

https://i.stack.imgur.com/JRjue.jpg

Hi,
as a title,
I have on C:C 14 dropdowns menu with F:F list,
I create via Apps script

actlist = main.getRange('F10:F24')

let dropdownPosition = main.getRange(10,3,15)
dropdownAct = SpreadsheetApp.newDataValidation().requireValueInRange(actList).build();
dropdownPosition.setDataValidation(dropdownAct) ;

I’m a real beginner and my problem that I can’t solve is “how to remove/hide from the list the values already used in the previous dropdown, to avoid entering the same value twice

I tried to create two columns and using FILTER AND COUNTIF I was going to remove the values already used, but obviously the dropdown came back to me
“Invalid: Input must fall within specified range”
because the value was no longer included in the list

Is there a quicker system, perhaps in javascript / app script to solve this problem without errors?

Thanks in advance

actlist = main.getRange('F10:F24')

let dropdownPosition = main.getRange(10,3,15)
dropdownAct = SpreadsheetApp.newDataValidation().requireValueInRange(actList).build();
dropdownPosition.setDataValidation(dropdownAct) ;

I tried to create two columns and using FILTER AND COUNTIF I was going to remove the values already used, but obviously the dropdown came back to me
“Invalid: Input must fall within specified range”
because the value was no longer included in the list