ListItem item = get the item here
item["Modified"] = modifiedDate; // new modified date
FieldUserValue newModifiedBy = new FieldUserValue();
newModifiedBy.LookupId = modifiedBy; // your LookupId value
item["Editor"] = newModifiedBy;
item.Update();
$ctx.ExecuteQuery();