In the client script we can get the field using field id.
let currentRecord=scriptContext.currentRecord;
let fieldName = currentRecord.getField({
fieldId: ‘fieldid’
});
fieldName.isDisabled = true;
We can use this method to restrict a field based on the user role.