A checkbox is data validation, not a widget
When you insert a checkbox through the Sheets UI (Insert > Checkbox), Sheets applies a data validation rule to the cell — specifically, it calls the equivalent of `requireCheckbox()` on a `DataValidationBuilder`. The cell's value is not some opaque checkbox object; it is the boolean `true` when checked and `false` when unchecked. That distinction matters the moment you try to read or set it programmatically.
To do this in Apps Script, chain `newDataValidation().requireCheckbox().build()` and pass the result to `cell.setDataValidation(rule)`. You still need to call `cell.setValue(false)` afterward — `setDataValidation` attaches the rule but does not initialize the value, and an empty cell displays as unchecked but its value is `null`, which will bite you on the first comparison.
The first time I hit this, my `onEdit` handler was comparing the cell value to the string `'TRUE'` — because I had seen `.getValue()` return that string from a non-checkbox boolean column elsewhere. Checkbox cells return the actual boolean `true` or `false`, not the string. Use strict equality (`=== true`) and save yourself the debug session.