Don’t allow the google sheet user to change the data after entering once except sheet owner

in sheet "FMS" i am trying to apply a script from chat-gpt for column AA:AB. there are prefilled data before applying the script. that is working the wrong way. the user to whom i have shared the file is allowed to change the prefilled data in column AA while in column AB is it is not allowing to fill even empty cells.

what i want is prefilled data should also be protected and the non empty cells should allow to enter data only once. no one can change the data except the file owner. i am not familiar with the scripts. i have pasted the script in line 487. please modify that accordingly.
text